Skip to content

Commit ffae9bc

Browse files
Merge pull request #2 from funkenstein/deps-update
Deps update
2 parents be844c8 + f3a1735 commit ffae9bc

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.pyc
2+
env/

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ Upcoming
3030
Installation
3131
------------
3232

33-
If you don't have BeautifulSoup installed:
34-
35-
`pip install beautifulsoup4`
36-
3733
Download the latest xssless:
3834

3935
`git clone https://github.com/mandatoryprogrammer/xssless`
4036

37+
Install dependencies:
38+
39+
`pip install -r requirements.txt`
40+
4141
Run the script:
4242

4343
`./xssless.py -h`

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
beautifulsoup4

xssless.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#!/usr/bin/env python
2+
23
import sys
34
from bs4 import BeautifulSoup
45
import base64
56
import json
67
import os
7-
import magic
8+
import mimetypes
9+
810
# Import burp export and return a list of decoded data
911
def get_burp_list(filename):
1012
if not os.path.exists(filename):
@@ -280,9 +282,7 @@ def xss_gen(requestList, settingsDict):
280282
filecontents = payload_encode_file(settingsDict['fileDict'][item['name']])
281283

282284
# Find content type
283-
m = magic.open(magic.MAGIC_MIME)
284-
m.load()
285-
content_type = m.file(settingsDict['fileDict'][item['name']])
285+
content_type = mimetypes.guess_type(settingsDict['fileDict'][item['name']])[0]
286286

287287
multipart += 'Content-Disposition: form-data; name="' + item['name'] + '"; filename="' + item['filename'] + '"\\r\\n'
288288
multipart += 'Content-Type: ' + content_type + '\\r\\n\\r\\n'

0 commit comments

Comments
 (0)