diff --git a/pwndbg/commands/aslr.py b/pwndbg/commands/aslr.py index deaf4e23e..fa46b48b1 100644 --- a/pwndbg/commands/aslr.py +++ b/pwndbg/commands/aslr.py @@ -1,6 +1,7 @@ -import pwndbg.vmmap -import pwndbg.commands import pwndbg.color +import pwndbg.commands +import pwndbg.vmmap + @pwndbg.commands.OnlyWhenRunning @pwndbg.commands.Command @@ -10,4 +11,3 @@ def aslr(): status = pwndbg.color.green('ON') print("ASLR is %s" % status) - diff --git a/pwndbg/commands/auxv.py b/pwndbg/commands/auxv.py index 5d5f0a764..b9134c15b 100644 --- a/pwndbg/commands/auxv.py +++ b/pwndbg/commands/auxv.py @@ -1,4 +1,5 @@ from __future__ import print_function + import gdb import pwndbg.auxv import pwndbg.chain diff --git a/pwndbg/commands/ida.py b/pwndbg/commands/ida.py index d5138f6dc..4da8f0107 100644 --- a/pwndbg/commands/ida.py +++ b/pwndbg/commands/ida.py @@ -4,6 +4,7 @@ import pwndbg.commands.context import pwndbg.ida import pwndbg.regs + @pwndbg.commands.ParsedCommand @pwndbg.commands.OnlyWhenRunning @pwndbg.events.stop diff --git a/pwndbg/commands/misc.py b/pwndbg/commands/misc.py index 2c8fb379e..2b3b2f076 100644 --- a/pwndbg/commands/misc.py +++ b/pwndbg/commands/misc.py @@ -1,8 +1,9 @@ -import pwndbg.commands -import pwndbg.regs import errno as _errno import struct +import pwndbg.commands +import pwndbg.regs + _errno.errorcode[0] = 'OK' @pwndbg.commands.ParsedCommand diff --git a/pwndbg/commands/procinfo.py b/pwndbg/commands/procinfo.py index d4b0061a9..0d5fb16dc 100644 --- a/pwndbg/commands/procinfo.py +++ b/pwndbg/commands/procinfo.py @@ -1,8 +1,10 @@ -import gdb import os -import pwndbg.proc -import pwndbg.commands + +import gdb import pwndbg.auxv +import pwndbg.commands +import pwndbg.proc + try: import psutil except: diff --git a/pwndbg/commands/start.py b/pwndbg/commands/start.py index d923af044..8dc5940e3 100644 --- a/pwndbg/commands/start.py +++ b/pwndbg/commands/start.py @@ -6,9 +6,9 @@ entry point. """ import gdb import pwndbg.commands -import pwndbg.symbol -import pwndbg.events import pwndbg.elf +import pwndbg.events +import pwndbg.symbol break_on_first_instruction = False diff --git a/pwndbg/commands/telescope.py b/pwndbg/commands/telescope.py index d8c847e4b..4499ec095 100644 --- a/pwndbg/commands/telescope.py +++ b/pwndbg/commands/telescope.py @@ -77,4 +77,4 @@ def stack(*a): Starting at the specified address, recursively dereference N pointers (default 8). """ - telescope(*a) \ No newline at end of file + telescope(*a) diff --git a/pwndbg/disasm.py b/pwndbg/disasm.py index 226e708c7..0b131dc4a 100644 --- a/pwndbg/disasm.py +++ b/pwndbg/disasm.py @@ -5,6 +5,7 @@ Functionality for disassmebling code at an address, or at an address +/- a few instructions. """ import collections + import gdb import pwndbg.arch import pwndbg.color diff --git a/pwndbg/elf.py b/pwndbg/elf.py index ba9e2b45b..bdc2915e9 100644 --- a/pwndbg/elf.py +++ b/pwndbg/elf.py @@ -18,9 +18,9 @@ import gdb import pwndbg.auxv import pwndbg.events import pwndbg.info -import pwndbg.proc import pwndbg.memoize import pwndbg.memory +import pwndbg.proc import pwndbg.stack import pwndbg.typeinfo diff --git a/pwndbg/enhance.py b/pwndbg/enhance.py index b0c5aeb69..7102b85d2 100644 --- a/pwndbg/enhance.py +++ b/pwndbg/enhance.py @@ -9,6 +9,7 @@ dependent on page permissions, the contents of the data, and any supplemental information sources (e.g. active IDA Pro connection). """ import string + import gdb import pwndbg.arch import pwndbg.color diff --git a/pwndbg/events.py b/pwndbg/events.py index dae004b18..d57c9729f 100644 --- a/pwndbg/events.py +++ b/pwndbg/events.py @@ -6,9 +6,10 @@ when various events occur to the debuggee (e.g. STOP on SIGINT) by using a decorator. """ import functools +import sys import traceback + import gdb -import sys debug = False pause = 0 diff --git a/pwndbg/ida.py b/pwndbg/ida.py index 85d9c8908..a2987d707 100644 --- a/pwndbg/ida.py +++ b/pwndbg/ida.py @@ -7,19 +7,19 @@ interactive debugging. """ import errno import functools +import os import socket import traceback from contextlib import closing import gdb -import os import pwndbg.arch +import pwndbg.compat import pwndbg.elf import pwndbg.events import pwndbg.memoize import pwndbg.memory import pwndbg.regs -import pwndbg.compat try: import xmlrpc.client as xmlrpclib diff --git a/pwndbg/proc.py b/pwndbg/proc.py index 07c49b4f6..ff737521a 100644 --- a/pwndbg/proc.py +++ b/pwndbg/proc.py @@ -4,8 +4,8 @@ Provides values which would be available from /proc which are not fulfilled by other modules. """ -import sys import functools +import sys from types import ModuleType import gdb diff --git a/pwndbg/search.py b/pwndbg/search.py index 13263885d..5bc294e6a 100644 --- a/pwndbg/search.py +++ b/pwndbg/search.py @@ -6,10 +6,10 @@ Search the address space for byte patterns or pointer values. import struct import gdb +import pwndbg.arch import pwndbg.memory import pwndbg.typeinfo import pwndbg.vmmap -import pwndbg.arch def search(searchfor): diff --git a/pwndbg/stdio.py b/pwndbg/stdio.py index 77d1bcb8b..c148a247c 100644 --- a/pwndbg/stdio.py +++ b/pwndbg/stdio.py @@ -2,9 +2,10 @@ Provides functionality to circumvent GDB's hooks on sys.stdin and sys.stdout which prevent output from appearing on-screen inside of certain event handlers. """ -import gdb import io import sys + +import gdb import pwndbg.compat debug = False diff --git a/pwndbg/symbol.py b/pwndbg/symbol.py index 3d6a6b387..1b1647ef9 100644 --- a/pwndbg/symbol.py +++ b/pwndbg/symbol.py @@ -16,6 +16,7 @@ import pwndbg.remote import pwndbg.stack import pwndbg.vmmap + @pwndbg.memoize.reset_on_objfile def get(address, gdb_only=False): """