File: 0002-Do-not-pollute-usr-bin-with-random-scripts.patch

package info (click to toggle)
pwntools 4.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,508 kB
  • sloc: python: 59,870; ansic: 48,351; asm: 45,047; sh: 396; makefile: 256
file content (61 lines) | stat: -rw-r--r-- 1,527 bytes parent folder | download
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
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Mon, 11 Apr 2022 12:04:19 +0200
Subject: Do not pollute /usr/bin with random scripts

---
 setup.py | 42 ------------------------------------------
 1 file changed, 42 deletions(-)

diff --git a/setup.py b/setup.py
index f27e195..9255cc6 100755
--- a/setup.py
+++ b/setup.py
@@ -23,48 +23,6 @@ for scheme in INSTALL_SCHEMES.values():
 
 console_scripts = ['pwn=pwnlib.commandline.main:main']
 
-# Find all of the ancillary console scripts
-# We have a magic flag --include-all-scripts
-flag = '--only-use-pwn-command'
-if flag in sys.argv:
-    sys.argv.remove(flag)
-else:
-    flag = False
-
-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
-    if not flag:
-        console_scripts.append(script)
 
 compat = {}
 if sys.version_info < (3, 4):