Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
81 lines (70 loc) · 2.26 KB

File metadata and controls

executable file
·
81 lines (70 loc) · 2.26 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/usr/bin/env python3
import glob
import os
import sys
from distutils.command.install import INSTALL_SCHEMES
from distutils.sysconfig import get_python_inc
from distutils.util import convert_path
from setuptools import setup
# Get all template files
templates = []
for dirpath, dirnames, filenames in os.walk(convert_path('pwnlib/shellcraft/templates'), followlinks=True):
for f in filenames:
templates.append(os.path.relpath(os.path.join(dirpath, f), 'pwnlib'))
# This makes pwntools-LICENSE.txt appear with the package folders
for scheme in INSTALL_SCHEMES.values():
scheme['data'] = scheme['purelib']
console_scripts = ['pwn=pwnlib.commandline.main:main']
DEPRECATED_SCRIPTS= [
'asm',
# 'checksec',
# 'constgrep',
'cyclic',
'debug',
'disablenx',
'disasm',
'elfdiff',
'elfpatch',
'errno',
'hex',
# 'libcdb',
# 'phd',
# 'pwnstrip',
'scramble',
# 'shellcraft',
'template',
'unhex',
]
for filename in glob.glob('pwnlib/commandline/*'):
filename = os.path.basename(filename)
filename, ext = os.path.splitext(filename)
if ext != '.py' or filename in ('__init__', 'common', 'main', 'update', 'version'):
continue
if filename in DEPRECATED_SCRIPTS:
script = '%s=pwnlib.commandline.common:deprecated_main' % filename
else:
script = '%s=pwnlib.commandline.common:main' % filename
console_scripts.append(script)
# Check that the user has installed the Python development headers
PythonH = os.path.join(get_python_inc(), 'Python.h')
if not os.path.exists(PythonH):
print("You must install the Python development headers!", file=sys.stderr)
print("$ sudo apt-get install python-dev", file=sys.stderr)
sys.exit(-1)
setup(
version = '5.0.0dev',
data_files = [('share/doc/pwntools',
glob.glob('*.md') + glob.glob('*.txt')),
],
package_data = {
'pwnlib': [
'data/crcsums.txt',
'data/useragents/useragents.txt',
'data/binutils/*',
'data/includes/*.h',
'data/includes/*/*.h',
'data/templates/*.mako',
] + templates,
},
entry_points = {'console_scripts': console_scripts},
)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.