Skip to content

Deps update #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 21, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.pyc
env/
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ Upcoming
Installation
------------

If you don't have BeautifulSoup installed:

`pip install beautifulsoup4`

Download the latest xssless:

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

Install dependencies:

`pip install -r requirements.txt`

Run the script:

`./xssless.py -h`
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
beautifulsoup4
8 changes: 4 additions & 4 deletions xssless.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/usr/bin/env python

import sys
from bs4 import BeautifulSoup
import base64
import json
import os
import magic
import mimetypes

# Import burp export and return a list of decoded data
def get_burp_list(filename):
if not os.path.exists(filename):
Expand Down Expand Up @@ -280,9 +282,7 @@ def xss_gen(requestList, settingsDict):
filecontents = payload_encode_file(settingsDict['fileDict'][item['name']])

# Find content type
m = magic.open(magic.MAGIC_MIME)
m.load()
content_type = m.file(settingsDict['fileDict'][item['name']])
content_type = mimetypes.guess_type(settingsDict['fileDict'][item['name']])[0]

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