|
1 | 1 | # Get all the modules from pwnlib |
2 | | -import collections |
3 | | -import logging |
4 | | -import math |
5 | | -import operator |
6 | | -import os |
7 | | -import platform |
8 | | -import re |
9 | | -import socks |
10 | | -import signal |
11 | | -import string |
12 | | -import struct |
13 | | -import subprocess |
14 | | -import sys |
15 | | -import tempfile |
16 | | -import threading |
17 | | -import time |
| 2 | +import collections as collections |
| 3 | +import logging as logging |
| 4 | +import math as math |
| 5 | +import operator as operator |
| 6 | +import os as os |
| 7 | +import platform as platform |
| 8 | +import re as re |
| 9 | +import socks as socks |
| 10 | +import signal as signal |
| 11 | +import string as string |
| 12 | +import struct as struct |
| 13 | +import subprocess as subprocess |
| 14 | +import sys as sys |
| 15 | +import tempfile as tempfile |
| 16 | +import threading as threading |
| 17 | +import time as time |
18 | 18 |
|
19 | 19 | try: |
20 | 20 | import colored_traceback |
|
31 | 31 | # available on all platforms (e.g. Windows). |
32 | 32 | pass |
33 | 33 |
|
34 | | -from pprint import pprint |
| 34 | +from pprint import pprint as pprint |
35 | 35 |
|
36 | | -import pwnlib |
| 36 | +import pwnlib as pwnlib |
37 | 37 | from pwnlib import * |
38 | 38 | from pwnlib.asm import * |
39 | | -from pwnlib.context import Thread |
40 | | -from pwnlib.context import context, LocalContext |
41 | | -from pwnlib.dynelf import DynELF |
| 39 | +from pwnlib.context import Thread as Thread |
| 40 | +from pwnlib.context import context as context, LocalContext as LocalContext |
| 41 | +from pwnlib.dynelf import DynELF as DynELF |
42 | 42 | from pwnlib.encoders import * |
43 | | -from pwnlib.elf.corefile import Core, Corefile, Coredump |
44 | | -from pwnlib.elf.elf import ELF, load |
| 43 | +from pwnlib.elf.corefile import Core as Core, Corefile as Corefile, Coredump as Coredump |
| 44 | +from pwnlib.elf.elf import ELF as ELF, load as load |
45 | 45 | from pwnlib.encoders import * |
46 | | -from pwnlib.exception import PwnlibException |
47 | | -from pwnlib.gdb import attach, debug_assembly, debug_shellcode |
| 46 | +from pwnlib.exception import PwnlibException as PwnlibException |
| 47 | +from pwnlib.gdb import attach as attach, debug_assembly as debug_assembly, debug_shellcode as debug_shellcode |
48 | 48 | from pwnlib.filepointer import * |
49 | 49 | from pwnlib.filesystem import * |
50 | 50 | from pwnlib.flag import * |
51 | | -from pwnlib.fmtstr import FmtStr, fmtstr_payload, fmtstr_split |
| 51 | +from pwnlib.fmtstr import FmtStr as FmtStr, fmtstr_payload as fmtstr_payload, fmtstr_split as fmtstr_split |
52 | 52 | from pwnlib.log import getLogger |
53 | | -from pwnlib.memleak import MemLeak, RelativeMemLeak |
| 53 | +from pwnlib.memleak import MemLeak as MemLeak, RelativeMemLeak as RelativeMemLeak |
54 | 54 | from pwnlib.regsort import * |
55 | 55 | from pwnlib.replacements import * |
56 | | -from pwnlib.rop import ROP |
57 | | -from pwnlib.rop.call import AppendedArgument |
58 | | -from pwnlib.rop.srop import SigreturnFrame |
59 | | -from pwnlib.rop.ret2dlresolve import Ret2dlresolvePayload |
| 56 | +from pwnlib.rop import ROP as ROP |
| 57 | +from pwnlib.rop.call import AppendedArgument as AppendedArgument |
| 58 | +from pwnlib.rop.srop import SigreturnFrame as SigreturnFrame |
| 59 | +from pwnlib.rop.ret2dlresolve import Ret2dlresolvePayload as Ret2dlresolvePayload |
60 | 60 | from pwnlib.runner import * |
61 | | -from pwnlib.term.readline import str_input |
62 | | -from pwnlib.timeout import Timeout |
63 | | -from pwnlib.tubes.listen import listen |
64 | | -from pwnlib.tubes.process import process, PTY, PIPE, STDOUT |
65 | | -from pwnlib.tubes.remote import remote, tcp, udp, connect |
66 | | -from pwnlib.tubes.serialtube import serialtube |
67 | | -from pwnlib.tubes.server import server |
68 | | -from pwnlib.tubes.ssh import ssh |
69 | | -from pwnlib.tubes.tube import tube |
| 61 | +from pwnlib.term.readline import str_input as str_input |
| 62 | +from pwnlib.timeout import Timeout as Timeout |
| 63 | +from pwnlib.tubes.listen import listen as listen |
| 64 | +from pwnlib.tubes.process import process as process, PTY as PTY, PIPE as PIPE, STDOUT as STDOUT |
| 65 | +from pwnlib.tubes.remote import remote as remote, tcp as tcp, udp as udp, connect as connect |
| 66 | +from pwnlib.tubes.serialtube import serialtube as serialtube |
| 67 | +from pwnlib.tubes.server import server as server |
| 68 | +from pwnlib.tubes.ssh import ssh as ssh |
| 69 | +from pwnlib.tubes.tube import tube as tube |
70 | 70 | from pwnlib.ui import * |
71 | | -from pwnlib.util import crc |
72 | | -from pwnlib.util import iters |
73 | | -from pwnlib.util import net |
74 | | -from pwnlib.util import proc |
75 | | -from pwnlib.util import safeeval |
76 | | -from pwnlib.util.crc import BitPolynom |
| 71 | +from pwnlib.util import crc as crc |
| 72 | +from pwnlib.util import iters as iters |
| 73 | +from pwnlib.util import net as net |
| 74 | +from pwnlib.util import proc as proc |
| 75 | +from pwnlib.util import safeeval as safeeval |
| 76 | +from pwnlib.util.crc import BitPolynom as BitPolynom |
77 | 77 | from pwnlib.util.cyclic import * |
78 | 78 | from pwnlib.util.fiddling import * |
79 | 79 | from pwnlib.util.getdents import * |
80 | 80 | from pwnlib.util.hashes import * |
81 | 81 | from pwnlib.util.lists import * |
82 | 82 | from pwnlib.util.misc import * |
83 | 83 | from pwnlib.util.packing import * |
84 | | -from pwnlib.util.proc import pidof |
85 | | -from pwnlib.util.sh_string import sh_string, sh_prepare, sh_command_with |
| 84 | +from pwnlib.util.proc import pidof as pidof |
| 85 | +from pwnlib.util.sh_string import sh_string as sh_string, sh_prepare as sh_prepare, sh_command_with as sh_command_with |
86 | 86 | from pwnlib.util.splash import * |
87 | 87 | from pwnlib.util.web import * |
88 | 88 | from pwnlib.libc import * |
89 | 89 |
|
90 | 90 | # Promote these modules, so that "from pwn import *" will let you access them |
91 | 91 |
|
92 | | -import pickle |
93 | | -from io import BytesIO, StringIO |
| 92 | +import pickle as pickle |
| 93 | +from io import BytesIO as BytesIO, StringIO as StringIO |
94 | 94 |
|
95 | 95 | log = getLogger("pwnlib.exploit") |
96 | 96 | error = log.error |
|
0 commit comments