xtex
91d1a044b5
Try repo-oss-debug if repo-debug is not present ( #1977 )
2 years ago
Niko
e1db7446be
[Docs] Fix vmmap docstring. ( #1981 )
...
* Fix vmmap docstring.
* Update vmmap.py
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
2 years ago
Disconnect3d
bd5148c9ca
README: Add cheatsheet link ( #1975 )
2 years ago
Disconnect3d
eaedb653ec
cymbol: fix cymbol show and remove run and arch restrictions ( #1974 )
...
* cymbol: fix cymbol show and remove run and arch restrictions
Before this PR the cymbol show command was crashingh due to some recent changes to caching.
Here is the exception stacktrace from that crash:
```
pwndbg> cymbol -s Point
╭─────────────────────── Traceback (most recent call last) ────────────────────────╮
│ /root/pwndbg/pwndbg/commands/__init__.py:190 in __call__ │
│ │
│ 187 │ │
│ 188 │ def __call__(self, *args: Any, **kwargs: Any) -> str | None: │
│ 189 │ │ try: │
│ ❱ 190 │ │ │ return self.function(*args, **kwargs) │
│ 191 │ │ except TypeError as te: │
│ 192 │ │ │ print(f"{self.function.__name__.strip()!r}: {self.function.__d │
│ 193 │ │ │ pwndbg.exception.handle(self.function.__name__) │
│ │
│ /root/pwndbg/pwndbg/commands/__init__.py:302 in _OnlyWithArch │
│ │
│ 299 │ │ @functools.wraps(function) │
│ 300 │ │ def _OnlyWithArch(*a: Any, **kw: Any) -> Optional[T]: │
│ 301 │ │ │ if pwndbg.gdblib.arch.name in arch_names: │
│ ❱ 302 │ │ │ │ return function(*a, **kw) │
│ 303 │ │ │ else: │
│ 304 │ │ │ │ arches_str = ", ".join(arch_names) │
│ 305 │ │ │ │ print( │
│ │
│ /root/pwndbg/pwndbg/commands/__init__.py:346 in _OnlyWhenRunning │
│ │
│ 343 │ @functools.wraps(function) │
│ 344 │ def _OnlyWhenRunning(*a: Any, **kw: Any) -> Optional[T]: │
│ 345 │ │ if pwndbg.gdblib.proc.alive: │
│ ❱ 346 │ │ │ return function(*a, **kw) │
│ 347 │ │ else: │
│ 348 │ │ │ print(f"{function.__name__}: The program is not being run.") │
│ 349 │ │ │ return None │
│ │
│ /root/pwndbg/pwndbg/commands/cymbol.py:265 in cymbol │
│ │
│ 262 │ elif load: │
│ 263 │ │ load_custom_structure(load) │
│ 264 │ elif show: │
│ ❱ 265 │ │ show_custom_structure(show) │
│ 266 │ else: │
│ 267 │ │ parser.print_help() │
│ 268 │
│ │
│ /root/pwndbg/pwndbg/commands/cymbol.py:70 in wrapper │
│ │
│ 67 │ │ if not os.path.exists(pwndbg_custom_structure_path): │
│ 68 │ │ │ print(message.error("No custom structure was found with the gi │
│ 69 │ │ │ return │
│ ❱ 70 │ │ return func(custom_structure_name, pwndbg_custom_structure_path) │
│ 71 │ │
│ 72 │ return wrapper │
│ 73 │
│ │
│ /root/pwndbg/pwndbg/commands/cymbol.py:201 in show_custom_structure │
│ │
│ 198 @OnlyWhenStructFileExists │
│ 199 def show_custom_structure(custom_structure_name: str, custom_structure_pat │
│ 200 │ # Call wrapper .func() to avoid memoization. │
│ ❱ 201 │ highlighted_source = pwndbg.pwndbg.commands.context.get_highlight_sour │
│ 202 │ │ custom_structure_path │
│ 203 │ ) │
│ 204 │ print("\n".join(highlighted_source)) │
╰──────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'function' object has no attribute 'func'
```
* Update pwndbg/commands/cymbol.py
2 years ago
Niko
d43d95cc21
Update README.md ( #1969 )
...
Project pronunciation update.
From poundbag to pown debug (pown-dee-bug).
2 years ago
HackSys Team
e230a853d3
FIX: pwndbg.gdblib.regs.frame is None ( #1966 )
...
This commit reverts a previous commit that removed check against the frame register.
* FIX: revert c37030633a as pwndbg.gdblib.regs.frame can be None
The reason for that is that when you debug Chrome on arm64 using a gdbserver, we may end up with a "Unknown register type: None" message printed out due to lack of this check.
The stacktrace for this message can be found below:
```
Unknown register type: None
Traceback (most recent call last):
File "/home/pwndbg/pwndbg/commands/__init__.py", line 181, in __call__
return self.function(*args, **kwargs)
File "/home/pwndbg/pwndbg/commands/__init__.py", line 328, in _OnlyWhenRunning
return function(*a, **kw)
File "/home/pwndbg/pwndbg/commands/telescope.py", line 197, in telescope
bp = pwndbg.gdblib.regs[pwndbg.gdblib.regs.frame]
File "/home/pwndbg/pwndbg/lib/cache.py", line 138, in decorator
value = func(*a, **kw)
File "/home/pwndbg/pwndbg/gdblib/regs.py", line 66, in __getitem__
```
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
2 years ago
HackSys Team
7d0cf3933a
Update DevContainer Configuration for Enhanced Development Experience ( #1964 )
...
* FIX: Upgraded devcontainer image to bookworm and added some useful extensions
* FIX: use ubuntu jammy image and add .gdbinit file in docker container user home folder not root
* FIX: Switch to root users as other tests are failing with permission denied
* FIX: update devcontainer file to remove unnecessary extensions, and unused dot files as we removed the extensions
* FIX: only add the .gdbinit file if it does not exists
* FIX: minor change
* Update Dockerfile
* Update .devcontainer/devcontainer.json
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
2 years ago
patryk4815
1507888a1f
arch.py: fix arch detection for riscv ( #1962 )
...
* arch.py: fix arch detection for riscv again
* arch.py: fix arch detection for riscv again
* arch.py: fix lint
2 years ago
Disconnect3d
fb2777c065
Update LICENSE.md ( #1963 )
2 years ago
dependabot[bot]
06a0c18fd8
Bump paramiko from 3.3.1 to 3.4.0 ( #1961 )
...
Bumps [paramiko](https://github.com/paramiko/paramiko ) from 3.3.1 to 3.4.0.
- [Commits](https://github.com/paramiko/paramiko/compare/3.3.1...3.4.0 )
---
updated-dependencies:
- dependency-name: paramiko
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years ago
Disconnect3d
9d0621c4d7
Fetch stacks from vmmap if they exist (also stacks.update -> stacks.get) ( #1959 )
...
Hopefully fixes #1947 by fetching stacks only when they are used instead
of doing it on each stop event. It will also first try to compute stacks
dictionary based on vmmap and if it fallbacks to exploring stacks if
vmmap is not present.
2 years ago
keymoon
03e97e9ea8
Implement a way to resolve multiple process in attachp ( #1956 )
...
* implement various resolve method to attachp
* add tests
* lint tests
* fix resolve_none test
* fix procps issue
* remove unused function
* Update pwndbg/commands/attachp.py
* Update pwndbg/commands/attachp.py
* first/last -> oldest/newest
* change default value to ask
* Provide informations about the config
* fix test
* fix lint
* catch eoferror
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
2 years ago
patryk4815
40b7928d9e
fix missing cryptography 41.0.6 dependency in "nix" + add "release" workflow on pull_requests ( #1955 )
...
* add checking if "releases" build successfully on pull requests
* flake.lock: fix missing cryptography 41.0.6 dependency
2 years ago
Disconnect3d
0c61ed5d27
mmap command: update return value message ( #1954 )
...
Updates the mmap return value message from just "0x1234" to "mmap syscall returned 0x1234"
2 years ago
Matt
dfd5f95b56
Add mmap command that executes the mmap syscall in the inferior ( #1952 )
...
* Initial implementation of the mmap command
- Additionally, moves syscall execution and general inferior-scoped code
execution facilities into a single, new file, in 'pwndbg/gdblib/shellcode.py'
* Add warnings and fix a few nits
* Lint
* Update pwndbg/commands/mmap.py
* Update pwndbg/commands/mmap.py
* Update pwndbg/commands/mmap.py
* Update pwndbg/commands/mmap.py
* Update pwndbg/commands/mmap.py
* Update pwndbg/gdblib/shellcode.py
* Update pwndbg/commands/mmap.py
* Update pwndbg/commands/mmap.py
* Make mmap faster for `--force`
* Add initial tests for `mmap`
* Update tests/gdb-tests/tests/test_mmap.py
* Add a testcase for fd-backed mmap calls
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
2 years ago
intrigus-lgtm
427bf8c96e
Port gdb-tests from bash to python ( #1916 )
...
* [WIP] Port gdb-tests from bash to python
* Use threads instead of processes
* Port gdb tests to python
* Linting
* Fix coverage "again"
* Remove bash tests
---------
Co-authored-by: intrigus <abc123zeus@live.de>
2 years ago
dependabot[bot]
13f467b024
Bump cryptography from 41.0.5 to 41.0.6 ( #1945 )
...
Bumps [cryptography](https://github.com/pyca/cryptography ) from 41.0.5 to 41.0.6.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst )
- [Commits](https://github.com/pyca/cryptography/compare/41.0.5...41.0.6 )
---
updated-dependencies:
- dependency-name: cryptography
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years ago
kotee4ko
bbfd109037
[heap] `hi` command -- feature to check if an address belongs to a chunk. ( #1938 )
...
* add hi -- heap_info
* add default return after first hit
* fix
* ready
* + Add __contains__ method of Chunk class
+ Update verbose output features
* heap_info: new chunk detection feature
* heap_info: new chunk detection feature (lint >_<)
* heap_info: new chunk detection feature (lint >_<) 2
* eap_info: new chunk detection feature (lint >_<) 3
---------
Co-authored-by: Administrator <admin@example.com>
Co-authored-by: Th3C4t <swagcat228@gmail.com>
2 years ago
psondej
05f0dbf9f9
releases.yml: add support for aarch64 packaging
2 years ago
OB
01e6657a43
sorted lists
2 years ago
OB
7eb09f6f23
lint
2 years ago
OB
80d83456a1
comment
2 years ago
OB
2393ccc155
add arm as well
2 years ago
OB
6b41c07e5b
Add sigreturn for i386 and aarch64
2 years ago
OB
209d2a9d77
lint
2 years ago
OB
e3c8cd3e87
Add --print flag to optionally print addresses of frame values
2 years ago
OB
34ddc89103
Clarifying comment
2 years ago
OB
8e77b8ce4a
Pull values from pwntools, make more architecture agnostic
2 years ago
OB
d0c3c764ad
comment additions
2 years ago
OB
d70b07830d
Implement --all flag
2 years ago
OB
380e4df03a
Print sigreturn frame, x86-64
2 years ago
psondej
68e53bcc56
README.md: add portable info
2 years ago
psondej
8a22162495
README.md: add portable info
2 years ago
Levente Polyak
139b7542cd
fix: allow site installation without enforcing a venv
...
Currently the only way to circumvent the venv checks is setting an
environment variable. However, this is not sufficient for distro site
packaging:
- if the variable is not set, its a rather bad and unexpected user
experience to somehow magically set PWNDBG_PLEASE_SKIP_VENV
- if the variable is set globally as login shell profile, this means
skipping venv is always enforced which means if gdb is loaded with a
pwndbg gdbinit.py from a git clone, its rather unexpected to skip the
venv
This patch checks for a `.skip-venv` file alongside the `gdbinit.py`
which means for site installations that use de-vendored dependencies
like during distro packaging, this file can simply be touched. It would
skip the venv when pwndbg is loaded from the site installation but at
the same time would not skip loading the venv when pwndbg is started
from a git clone.
2 years ago
Disconnect3d
61787b3597
Update pwndbg/commands/checksec.py
2 years ago
Disconnect3d
7498db42b4
Update pwndbg/commands/checksec.py
2 years ago
Disconnect3d
5e605ccf26
Update pwndbg/commands/checksec.py
2 years ago
Disconnect3d
49853b97bb
Update pwndbg/commands/checksec.py
2 years ago
Disconnect3d
4a9a3de6d5
Update pwndbg/commands/checksec.py
2 years ago
CristhianMotoche
72e45fd3fe
fix: Wrap in normal to go back to reset color
2 years ago
CristhianMotoche
bbf69a8000
ref: Use already defined colors
2 years ago
CristhianMotoche
fe1b539145
fix: Apply black
2 years ago
CristhianMotoche
5a21adf388
fix: Apply isort
2 years ago
CristhianMotoche
a399ab787f
attempt: Colorize checksec output
2 years ago
psondej
ff8ecada5c
pyproject.toml: use upstream gdb-pt-dump
2 years ago
psondej
57cbe2a3d0
introduce github-ci lockfile checking for: flake.lock, poetry.lock
...
Signed-off-by: psondej <patryk.sondej@grupawp.pl>
2 years ago
psondej
015c33772b
README.md: fix typo
2 years ago
psondej
ab96e1a9b9
- remove gdb-pt-dump from all files
...
- remove submodules from all files
- bump flake.lock
- add gdb-pt-dump as dependency
- fix building Dockerfile
- fix gdb-pt-dump was broken on portable packages
2 years ago
psondej
3fddf03f0a
remove submodule gdb-pt-dump
2 years ago
psondej
d5b6601c34
flake.lock: fix lock after changing repo in flake.nix
2 years ago