Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
nu11secur1ty
GitHub Repository: nu11secur1ty/Kali-Linux
Path: blob/master/sslstrip-work-2019/setup.py
1303 views
1
#!/usr/bin/env python
2
import sys, os, shutil
3
from distutils.core import setup, Extension
4
5
6
shutil.copyfile("sslstrip.py", "sslstrip/sslstrip")
7
8
setup (name = 'sslstrip',
9
version = '0.9',
10
description = 'A MITM tool that implements Moxie Marlinspike\'s HTTPS stripping attacks.',
11
author = 'Moxie Marlinspike',
12
author_email = '[email protected]',
13
url = 'http://www.thoughtcrime.org/software/sslstrip/',
14
license = 'GPL',
15
packages = ["sslstrip"],
16
package_dir = {'sslstrip' : 'sslstrip/'},
17
scripts = ['sslstrip/sslstrip'],
18
data_files = [('share/sslstrip', ['README', 'COPYING', 'lock.ico'])],
19
)
20
21
print "Cleaning up..."
22
try:
23
removeall("build/")
24
os.rmdir("build/")
25
except:
26
pass
27
28
try:
29
os.remove("sslstrip/sslstrip")
30
except:
31
pass
32
33
def capture(cmd):
34
return os.popen(cmd).read().strip()
35
36
def removeall(path):
37
if not os.path.isdir(path):
38
return
39
40
files=os.listdir(path)
41
42
for x in files:
43
fullpath=os.path.join(path, x)
44
if os.path.isfile(fullpath):
45
f=os.remove
46
rmgeneric(fullpath, f)
47
elif os.path.isdir(fullpath):
48
removeall(fullpath)
49
f=os.rmdir
50
rmgeneric(fullpath, f)
51
52
def rmgeneric(path, __func__):
53
try:
54
__func__(path)
55
except OSError, (errno, strerror):
56
pass
57
58