Skip to content

Commit e4e8b02

Browse files
Added setup.py as well as MANIFEST.in file for adding the data files on installation. Added webstring method to utils.py for converting Python dictionaries to a string suitable for use in HTTP POST requests in urllib2.
git-svn-id: http://pywebfuzz.googlecode.com/svn/trunk@24 82fd2642-525a-7321-434f-1f2799a5e545
1 parent bf3af58 commit e4e8b02

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include pywebfuzz
2+
recursive-include pywebfuzz/data *.txt *.fuzz

pywebfuzz/utils.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,19 @@ def generate_range(start, stop, step=1, pre=None, post=None):
9999
values.append(str(item))
100100
return(values)
101101
except:
102-
print("You did not specify all of the values necessary for this function")
102+
print("You did not specify all of the values necessary for this function")
103+
104+
def webstring(value):
105+
""" Convert a Python dictionary to a web string where the values are in the
106+
format of 'foo=bar&up=down'. This is necessary when processing needs to be done
107+
on a dictionary but the values need to be passed to urllib2 as POST data. """
108+
109+
data = ""
110+
for key in value:
111+
newstring = key + "=" + value[key] + "&"
112+
data += newstring
113+
114+
return(data.rstrip("&"))
115+
116+
117+

setup.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/usr/bin/env python
2+
3+
# from distutils.core import setup
4+
from setuptools import setup, find_packages
5+
import sys
6+
7+
VERSION = "0.3.0"
8+
9+
long_description = """pywebfuzz is a Python module to assist in the
10+
identification of vulnerabilities in web applications through brute force methods.
11+
The module does this by providing common testing values along with generators and
12+
other utilities that would be helpful when fuzzing web applications.
13+
14+
pywebfuzz has the fuzzdb project implemented in Python classes for ease of use.
15+
16+
fuzzdb is just a collection of values for testing. The point is to provide many of
17+
the values of the fuzzdb project cleaned up and available through Python classes
18+
and namespaces. This makes it easier to use these values in your own test cases.
19+
Effort was made to match the names up similarly to the folders and values files
20+
from the fuzzdb project. This effort can sometimes make for some ugly looking
21+
namespaces. This balance was struck so that familiarity with the fuzzdb project
22+
would cross over in to the Python code. The exceptions come in with the replacement
23+
of hyphens with underscores.
24+
"""
25+
26+
classifiers = [
27+
"Development Status :: 4 - Beta",
28+
"Environment :: Web Environment",
29+
"Intended Audience :: Security Testers",
30+
"License :: OSI Approved :: GPLv3",
31+
"Operating System :: OS Independent",
32+
"Programming Language :: Python",
33+
"Topic :: Internet :: WWW/HTTP",
34+
"Topic :: Security :: Testing"
35+
]
36+
37+
package_dir = {"pywebfuzz": "pywebfuzz"}
38+
39+
setup(name="pywebfuzz",
40+
version=VERSION,
41+
author="Nathan Hamiel",
42+
author_email="[email protected]",
43+
url="http://code.google.com/p/pywebfuzz/",
44+
download_url="http://pywebfuzz.googlecode.com/files/pywebfuzz_{0}.zip".format(VERSION),
45+
license="GPLv3",
46+
description="A Python module to assist in fuzzing web applications",
47+
long_description=long_description,
48+
package_dir=package_dir,
49+
packages=["pywebfuzz"],
50+
include_package_data=True,
51+
#package_data={"pywebfuzz": ["*.txt", "*.fuzz"]},
52+
classifiers=classifiers)

0 commit comments

Comments
 (0)