mirror of
https://github.com/Gallopsled/pwntools.git
synced 2026-10-12 02:02:27 +00:00
Cleanup Python 2 legacy (#2680)
* Cleanup Python 2 legacy * chore: update changelog
This commit is contained in:
@@ -113,6 +113,7 @@ The table below shows which release corresponds to each branch, and what date th
|
||||
- [#2643][2643] Refactor getdents.py, add support for SYS_getdents64
|
||||
- [#2647][2647] packing: Add `overlap` to overlap structures easily
|
||||
- [#2669][2669] asm: try native binutils before fallback architectures
|
||||
- [#2680][2680] Cleanup Python 2 legacy
|
||||
|
||||
[2675]: https://github.com/Gallopsled/pwntools/pull/2675
|
||||
[2652]: https://github.com/Gallopsled/pwntools/pull/2652
|
||||
@@ -152,6 +153,7 @@ The table below shows which release corresponds to each branch, and what date th
|
||||
[2643]: https://github.com/Gallopsled/pwntools/pull/2643
|
||||
[2647]: https://github.com/Gallopsled/pwntools/pull/2647
|
||||
[2669]: https://github.com/Gallopsled/pwntools/pull/2669
|
||||
[2680]: https://github.com/Gallopsled/pwntools/pull/2680
|
||||
|
||||
## 4.15.0 (`stable`)
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# pwntools documentation build configuration file, created by
|
||||
# sphinx-quickstart on Wed May 28 15:00:52 2014.
|
||||
#
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
# Promote useful stuff to toplevel
|
||||
from __future__ import absolute_import
|
||||
|
||||
from pwn.toplevel import *
|
||||
|
||||
pwnlib.args.initialize()
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
from pwnlib.context import LocalContext
|
||||
from pwnlib.context import context
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from pwnlib.adb.adb import *
|
||||
from pwnlib.adb.protocol import Client
|
||||
from pwnlib.adb.bootimg import BootImage
|
||||
|
||||
@@ -45,8 +45,6 @@ the :mod:`pwnlib.adb` module.
|
||||
adb.write('/data/local/tmp/foo', 'my data')
|
||||
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import functools
|
||||
import glob
|
||||
@@ -1603,4 +1601,3 @@ def version():
|
||||
"""Returns rthe platform version as a tuple."""
|
||||
prop = getprop('ro.build.version.release')
|
||||
return [int(v) for v in prop.split('.')]
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from __future__ import division
|
||||
|
||||
import ctypes
|
||||
|
||||
BOOT_MAGIC = b"ANDROID!"
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import unicode_literals
|
||||
from __future__ import division
|
||||
|
||||
import ctypes
|
||||
import io
|
||||
import os
|
||||
|
||||
@@ -48,9 +48,6 @@ The full list of supported "magic arguments" and their effects are listed
|
||||
below.
|
||||
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import collections
|
||||
import logging
|
||||
import os
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
r"""
|
||||
Utilities for assembling and disassembling code.
|
||||
|
||||
@@ -39,9 +38,6 @@ Disassembly
|
||||
' 0: b8 0b 00 00 00 mov eax, 0xb'
|
||||
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import errno
|
||||
import os
|
||||
import platform
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
Analogous to atexit, this module allows the programmer to register functions to
|
||||
be run if an unhandled exception occurs.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import sys
|
||||
import threading
|
||||
import traceback
|
||||
|
||||
@@ -7,9 +7,6 @@ this replacement module also defines :func:`unregister`.
|
||||
This module also fixes a the issue that exceptions raised by an exit handler is
|
||||
printed twice when the standard :mod:`atexit` is used.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import sys
|
||||
import threading
|
||||
import traceback
|
||||
@@ -100,4 +97,3 @@ if sys.version_info[0] < 3:
|
||||
sys.exitfunc = _run_handlers
|
||||
else:
|
||||
std_atexit.register(_run_handlers)
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import argparse
|
||||
import functools
|
||||
import re
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import argparse
|
||||
import string
|
||||
import sys
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import argparse
|
||||
from pwn import *
|
||||
from pwnlib.commandline import common
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import re
|
||||
import string
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import shutil
|
||||
from argparse import ArgumentParser
|
||||
from subprocess import CalledProcessError
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import sys
|
||||
|
||||
import pwnlib.args
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from __future__ import absolute_import, print_function
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import errno
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
#!/usr/bin/env python3
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from pwnlib.commandline import asm
|
||||
from pwnlib.commandline import checksec
|
||||
from pwnlib.commandline import common
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import signal
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import argparse
|
||||
|
||||
import pwnlib.args
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from pwn import *
|
||||
from pwnlib.commandline import common
|
||||
from pwnlib.util.misc import which, parse_ldd_output, write
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
from string import whitespace
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
#!/usr/bin/env python3
|
||||
import subprocess
|
||||
|
||||
import pwnlib.args
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Allows per-user and per-host configuration of Pwntools settings.
|
||||
|
||||
The list of configurable options includes all of the logging symbols
|
||||
@@ -32,9 +31,6 @@ supported by ``pwnlib.util.safeeval.expr``.
|
||||
[update]
|
||||
interval=7
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import configparser
|
||||
import os
|
||||
|
||||
|
||||
@@ -50,8 +50,6 @@ Example:
|
||||
61
|
||||
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
import importlib
|
||||
import sys
|
||||
from types import ModuleType
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Implements context management so that nested/scoped contexts and threaded
|
||||
contexts work properly and as expected.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import atexit
|
||||
import collections
|
||||
import errno
|
||||
@@ -282,7 +278,7 @@ class ContextType(object):
|
||||
|
||||
The context is usually specified at the top of the Python file for clarity. ::
|
||||
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
context.update(arch='i386', os='linux')
|
||||
|
||||
Currently supported properties and their defaults are listed below.
|
||||
|
||||
Vendored
-3
@@ -1,5 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
try:
|
||||
# These files are not distributed with Pwntools, but
|
||||
# are in the source tree and used for testing.
|
||||
@@ -9,4 +7,3 @@ except ImportError:
|
||||
|
||||
import os
|
||||
path = os.path.dirname(__file__)
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from pwnlib.data.elf import fmtstr
|
||||
from pwnlib.data.elf import relro
|
||||
from pwnlib.data.elf import ret2dlresolve
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
from __future__ import print_function
|
||||
|
||||
#!/usr/bin/env python3
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
from __future__ import division
|
||||
import argparse
|
||||
import keyword
|
||||
import os
|
||||
|
||||
@@ -34,7 +34,6 @@ binary_repr = repr(binary)
|
||||
libc_repr = repr(libc)
|
||||
%>\
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
%if not quiet:
|
||||
# This exploit template was generated via:
|
||||
# $ ${' '.join(map(sh_string, argv))}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Script for downloading lists of user agent strings."""
|
||||
from __future__ import division
|
||||
import os
|
||||
import urllib
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
class Device(object):
|
||||
arch = None
|
||||
bits = None
|
||||
|
||||
@@ -47,9 +47,6 @@ Example
|
||||
|
||||
DynELF
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import ctypes
|
||||
|
||||
from elftools.elf.enums import ENUM_D_TAG
|
||||
|
||||
@@ -4,8 +4,6 @@ Format (``ELF``). Generally, it is very useful to be able to interact with
|
||||
these files to extract data such as function addresses, ROP gadgets, and
|
||||
writable page addresses.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
from pwnlib.elf.corefile import Core
|
||||
from pwnlib.elf.datatypes import *
|
||||
from pwnlib.elf.elf import ELF
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
"""
|
||||
Kernel-specific ELF functionality
|
||||
"""
|
||||
from __future__ import division
|
||||
|
||||
class KernelConfig(object):
|
||||
def __init__(self, name, title, requires=[], excludes=[], minver=0, maxver=99):
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Read information from Core Dumps.
|
||||
|
||||
Core dumps are extremely useful when writing exploits, even outside of
|
||||
@@ -60,9 +59,6 @@ Module Members
|
||||
----------------------------------------
|
||||
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import collections
|
||||
import ctypes
|
||||
import glob
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
#!/usr/bin/env python3
|
||||
# mayhem/datatypes/elf.py
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -29,8 +27,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
from __future__ import division
|
||||
|
||||
import ctypes
|
||||
|
||||
Elf32_Addr = ctypes.c_uint32
|
||||
|
||||
@@ -44,9 +44,6 @@ An ELF can also be created from in-memory bytes.
|
||||
Module Members
|
||||
--------------
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import collections
|
||||
import gzip
|
||||
import mmap
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
# Pre-assembled shellcode for each architecture.
|
||||
#
|
||||
# This is literally the output of:
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
"""Emulates instructions in the PLT to locate symbols more accurately.
|
||||
"""
|
||||
from __future__ import division
|
||||
import logging
|
||||
|
||||
from pwnlib.args import args
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
"""
|
||||
Encode shellcode to avoid input filtering and impress your friends!
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
from pwnlib.encoders import amd64
|
||||
from pwnlib.encoders import arm
|
||||
from pwnlib.encoders import i386
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from pwnlib.encoders.amd64 import delta
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
from pwnlib.encoders.i386.delta import i386DeltaEncoder
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from pwnlib.encoders.arm import alphanumeric
|
||||
from pwnlib.encoders.arm import xor
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# Copyright (c) 2013 Pratik Kumar Sahu, Nagendra Chowdary, Anish Mathuria
|
||||
# Ported to Python by Gallopsled
|
||||
from __future__ import division
|
||||
|
||||
# +------------------------------------------------------------------------+
|
||||
# | ARM Instructions |
|
||||
# +------------------------------------------------------------------------+
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
# Copyright (c) 2013 Pratik Kumar Sahu, Nagendra Chowdary, Anish Mathuria
|
||||
# Ported to Python by Gallopsled
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import binascii
|
||||
import random
|
||||
import string
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
# Copyright (c) 2013 Pratik Kumar Sahu, Nagendra Chowdary, Anish Mathuria
|
||||
# Ported to Python by Gallopsled
|
||||
from __future__ import division
|
||||
from __future__ import absolute_import
|
||||
|
||||
from . import random_funcs
|
||||
|
||||
# +------------------------------------------------------------------------+
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
# Copyright (c) 2013 Pratik Kumar Sahu, Nagendra Chowdary, Anish Mathuria
|
||||
# Ported to Python by Gallopsled
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
from . import alphanum_byte
|
||||
from . import ARM_Instructions
|
||||
from . import random_funcs
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# Copyright (c) 2013 Pratik Kumar Sahu, Nagendra Chowdary, Anish Mathuria
|
||||
# Ported to Python by Gallopsled
|
||||
from __future__ import division
|
||||
|
||||
import os
|
||||
import random
|
||||
import struct
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
from pwnlib import shellcraft
|
||||
from pwnlib.asm import asm
|
||||
from pwnlib.context import context
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import collections
|
||||
import random
|
||||
import re
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from pwnlib.encoders.i386 import ascii_shellcode
|
||||
from pwnlib.encoders.i386 import delta
|
||||
from pwnlib.encoders.i386 import xor
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
characters """
|
||||
# https://github.com/Gallopsled/pwntools/pull/1667
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from itertools import product
|
||||
|
||||
from pwnlib.context import LocalContext
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import collections
|
||||
from random import choice
|
||||
from random import randint
|
||||
|
||||
@@ -9,9 +9,6 @@
|
||||
#; This program is distributed in the hope that it will be useful,
|
||||
#; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
#; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
from pwnlib import shellcraft
|
||||
from pwnlib.asm import asm
|
||||
from pwnlib.context import context
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from pwnlib.encoders.mips import xor
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
from pwnlib import asm
|
||||
from pwnlib import shellcraft
|
||||
from pwnlib.context import context
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
r"""
|
||||
File Structure Exploitation
|
||||
|
||||
@@ -22,9 +20,6 @@ Now payload contains the FILE structure with its vtable pointer pointing to 0xca
|
||||
Currently only 'amd64' and 'i386' architectures are supported
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import ctypes
|
||||
|
||||
from pwnlib.context import context
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Handles file abstraction for local vs. remote (via ssh)
|
||||
"""
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Handles file abstraction for remote SSH files
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from pwnlib.flag.flag import submit_flag
|
||||
|
||||
__all__ = [
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
"""Describes a way to submit a key to a key server.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import os
|
||||
|
||||
from pwnlib.args import args
|
||||
|
||||
@@ -93,8 +93,6 @@ Example - Automated exploitation
|
||||
format_string.execute_writes()
|
||||
|
||||
"""
|
||||
from __future__ import division
|
||||
|
||||
import logging
|
||||
import re
|
||||
from operator import itemgetter
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
During exploit development, it is frequently useful to debug the
|
||||
target binary under GDB.
|
||||
@@ -138,9 +137,6 @@ requires ``root`` access.
|
||||
Member Documentation
|
||||
===============================
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import os
|
||||
import platform
|
||||
import psutil
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
from pwnlib.tubes.process import process
|
||||
from time import sleep
|
||||
from sys import argv
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from __future__ import division
|
||||
|
||||
import sys
|
||||
from os.path import basename
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from __future__ import division
|
||||
|
||||
import re
|
||||
|
||||
from pygments.lexer import RegexLexer
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
"""
|
||||
Fetch a LIBC binary based on some heuristics.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import os
|
||||
import time
|
||||
import tempfile
|
||||
|
||||
@@ -91,9 +91,6 @@ unless :data:`context.log_level` is also set to ``'DEBUG'``. Other handlers
|
||||
will however see the extra log records generated by the ``'pwnlib.tubes.ssh'``
|
||||
logger.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import logging
|
||||
import os
|
||||
import random
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import ctypes
|
||||
import functools
|
||||
import string
|
||||
|
||||
@@ -5,9 +5,6 @@ Documentation is available here_.
|
||||
|
||||
.. _here: https://android.googlesource.com/platform/system/core/+/master/adb/protocol.txt
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import logging
|
||||
import functools
|
||||
import stat
|
||||
|
||||
@@ -72,9 +72,6 @@ the appropriate path. ::
|
||||
|
||||
Now QEMU should be able to run the libraries.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import os
|
||||
|
||||
from pwnlib.context import LocalContext
|
||||
@@ -171,4 +168,3 @@ def ld_prefix(path=None, env=None):
|
||||
libpath = libpath.decode('utf-8')
|
||||
|
||||
return libpath
|
||||
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Topographical sort
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
from collections import OrderedDict
|
||||
from collections import defaultdict
|
||||
from random import randint
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Abstracting ROP calls
|
||||
"""
|
||||
from __future__ import division
|
||||
|
||||
from pwnlib.abi import ABI
|
||||
from pwnlib.context import context
|
||||
from pwnlib.util import packing
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
class Gadget(object):
|
||||
"""
|
||||
Describes a ROP gadget
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
from capstone import *
|
||||
from capstone.x86 import *
|
||||
|
||||
|
||||
@@ -357,9 +357,6 @@ Let's try it out!
|
||||
>>> p.recvline()
|
||||
b'hello\n'
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import collections
|
||||
import copy
|
||||
import hashlib
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
r"""
|
||||
Sigreturn ROP (SROP)
|
||||
|
||||
@@ -159,9 +158,6 @@ Mipsel Example:
|
||||
0
|
||||
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
from pwnlib.abi import ABI
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import itertools
|
||||
import os
|
||||
import re
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import re
|
||||
|
||||
from pwnlib.context import context
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import sys
|
||||
|
||||
from pwnlib.term import completer
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
import errno
|
||||
import os
|
||||
import select
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
|
||||
from pwnlib.term import key
|
||||
|
||||
__all__ = ['Keymap']
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import io
|
||||
import sys
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
__all__ = ['spinners']
|
||||
|
||||
def billboard(msg, window):
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import atexit
|
||||
import errno
|
||||
import os
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user