kd7979148 commited on
Commit
f0e28b8
·
verified ·
1 Parent(s): afd9f5c

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +78 -0
README.md ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ pipeline_tag: text-classification
5
+ library_name: transformers
6
+ tags:
7
+ - cybersecurity
8
+ - xss
9
+ - security
10
+ - web
11
+ - payload-detection
12
+ - text-classification
13
+ ---
14
+ # XSS Payload Detector
15
+
16
+ DistilBERT-based machine learning model for detecting XSS payloads.
17
+
18
+ ## Labels
19
+
20
+ | Label | Description |
21
+ |---------|-------------|
22
+ | NORMAL | Benign input |
23
+ | XSS | Potential XSS payload |
24
+
25
+ ## Requirements
26
+
27
+ ```bash
28
+ pip install torch
29
+ pip install transformers
30
+ pip install flask
31
+ ```
32
+
33
+ ## Usage
34
+
35
+ Start the test server:
36
+
37
+ ```bash
38
+ python test_server.py
39
+ ```
40
+
41
+ Start monitoring:
42
+
43
+ ```bash
44
+ python monitor.py
45
+ ```
46
+
47
+ Open browser:
48
+
49
+ ```text
50
+ http://127.0.0.1:8080/?q=abcde
51
+ ```
52
+
53
+ Example payload:
54
+
55
+ ```text
56
+ http://127.0.0.1:8080/?q=<img src='x' onerror='alert("xss")'>
57
+ ```
58
+
59
+ ## CLI Tool
60
+
61
+ ```bash
62
+ python inference_bert_url.py
63
+ ```
64
+
65
+ This tool accepts user input and classifies it as NORMAL or XSS.
66
+
67
+ ## Model Files
68
+
69
+ - config.json
70
+ - model.safetensors
71
+ - tokenizer.json
72
+ - tokenizer_config.json
73
+ - vocab.txt
74
+
75
+ ## Framework
76
+
77
+ - PyTorch
78
+ - Transformers