-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
55 lines (45 loc) · 1.25 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import sys, os, shutil
from distutils.core import setup, Extension
shutil.copyfile("sslstrip.py", "sslstrip/sslstrip")
setup (name = 'sslstrip',
version = '0.6',
description = 'A MITM tool that implements Moxie Marlinspike\'s HTTPS stripping attacks.',
author = 'Moxie Marlinspike',
author_email = '[email protected]',
url = 'http://www.thoughtcrime.org/software/sslstrip/',
license = 'GPL',
packages = ["sslstrip"],
package_dir = {'sslstrip' : 'sslstrip/'},
scripts = ['sslstrip/sslstrip'],
data_files = [('share/sslstrip', ['README', 'COPYING', 'lock.ico'])],
)
print "Cleaning up..."
try:
removeall("build/")
os.rmdir("build/")
except:
pass
try:
os.remove("sslstrip/sslstrip")
except:
pass
def capture(cmd):
return os.popen(cmd).read().strip()
def removeall(path):
if not os.path.isdir(path):
return
files=os.listdir(path)
for x in files:
fullpath=os.path.join(path, x)
if os.path.isfile(fullpath):
f=os.remove
rmgeneric(fullpath, f)
elif os.path.isdir(fullpath):
removeall(fullpath)
f=os.rmdir
rmgeneric(fullpath, f)
def rmgeneric(path, __func__):
try:
__func__(path)
except OSError, (errno, strerror):
pass