Commit Graph

59 Commits

Author SHA1 Message Date
patryk4815 c80793f41e
add python3.10, add debian12, drop python3.8, drop ubuntu20.04, drop debian11 (#2421)
* drop ubuntu-20.04

* bump debian11->debian12

* bump python3.8->3.10

* bump py3.10 dependencies

* fix mypy/lint errors
2024-09-05 13:55:16 +02:00
Matt. c2bf902ea7
Port Pwndbg to LLDB (#2382)
* Port Pwndbg to LLDB

* Fix splitting mistakes

* I love typos

* We already check for Python 3.11 manually

* Update pwndbg/dbg/lldb/__init__.py

Co-authored-by: patryk4815 <bux.patryk@gmail.com>

* Fix use of wrong variable name that was preventing the vmmap from being used in LLDB memory reads

* Use cached vmmap for `read_memory` in LLDB

* Fix Pwndbg CLI jank

* Try using SBAddress to resolve objfile names in LLDB vmmap

* Fix missing changes in `pwndbg.gdblib`

* Update pwndbg/aglib/arch.py

* Update pwndbg/aglib/arch.py

* Remove outdated comment about `pwndbg.aglib.arch`

* Update pwndbg/dbg/lldb/repl/io.py

Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>

* Fix lints

* Fix new test so that it points to `pwndbg.aglib.disasm`

* Fix lints

---------

Co-authored-by: patryk4815 <bux.patryk@gmail.com>
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
2024-09-01 02:12:56 +02:00
Disconnect3d 0c6085d564
Bump version to 2024.08.29 (#2401) 2024-08-29 18:25:21 +02:00
Lennard Hofmann b4a1b9a177
Delete pwndbg.constants in favor of pwnlib (#2180)
* bump pwntools to 4.14.0b0

Run ./setup.sh or ./setup-dev.sh to upgrade.
This is required for RISC-V syscall numbers.

* Delete pwndbg.constants in favor of pwnlib
2024-08-14 15:29:48 +02:00
patryk4815 620f38008c
fix nix + charset + bump dependencies (#2355)
* fix charset issues

* use '.skip-venv' in nix'ed pwndbg

* bump nix & python dependencies, gdb15.1, python3.12.4
2024-08-14 00:19:23 +02:00
dependabot[bot] 85bf10879a
Bump setuptools in the pip group across 1 directory (#2308)
Bumps the pip group with 1 update in the / directory: [setuptools](https://github.com/pypa/setuptools).


Updates `setuptools` from 69.5.1 to 70.0.0
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v69.5.1...v70.0.0)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-type: direct:production
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-16 09:23:21 +02:00
Matt aa566e595a
Expand Debugger-agnostic API and split `pwndbg.dbg.evaluate_expression` (#2280) 2024-07-09 10:25:52 -07:00
OBarronCS 0ab077ffde
Import disasm folder gdblib (#2260) 2024-06-26 08:34:05 -07:00
Matt 2ecdce4ea8
Move main configuration object from `pwndbg.gdblib.config` to `pwndbg.config` (#2244)
* Split move from `pwndbg.gdblib.config` to `pwndbg.config`

* Move `pwndbg.config` to `pwndbg`

* Fix lints and pytest mocks
2024-06-21 12:31:38 -07:00
Matt d38e57639f
Move pwndbg/{heap,disasm} into gdblib (#2206) 2024-06-10 03:31:07 -07:00
dependabot[bot] 05926d0250
--- (#2178)
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 07:08:04 -07:00
peace-maker 90dc42e5b2
Additional type hints (#2120)
* Additional type hints

Activate `vermin --eval-annotations` to catch invalid type hints for Python 3.8.

Use `typing_extensions.ParamSpec` to avoid hiding function arguments through decorators.

* Fix safe linking detection

* Fix cast of glibc_version parameter in < Python 3.10

* Use "queue.Queue[int]" for Python 3.8 compatibility

* Address review

* Add comments and address review
2024-05-13 13:39:20 -07:00
Gulshan Singh 5e77036b77
Add script to generate command documentation (#2161)
* Add mdutils to docs dependencies

* Add script to generate the command docs

---

Co-authored-by: Niko <nikoshell20@gmail.com>
2024-05-09 14:11:10 -07:00
Gulshan Singh 33e91c2bab
Minor docs/website cleanup (#2159)
* Move docs dependencies into pyproject, install with poetry in GH action

* Remove old sphinx files

* Remove custom theme dir

* Hide navigation and toc on the blog page

* Remove fetch-depth from docs GH workflow

* Source venv before running mkdocs build

* Remove caching from docs GH workflow

* Remove python version in docs GH workflow
2024-05-09 13:48:42 -07:00
CptGibbon c2ace79eac
Use ruff as the default Python formatter in devcontainer.json (#2148)
* Set default devcontainer formatter to ruff

Update devcontainer.json to use charliermarsh.ruff as the default formatter.
This should bring the devcontainer environment in line with the CI-enforced formatting & linting.

* Remove black & pylint extensions from devcontainer.json

The black & pylint extensions are no longer used, ruff is now responsible for formatting and linting.

* Set source.organizeImports to "explicit"

The previous setting of true is deprecated

* Remove tool.black from pyproject.toml

* Remove tool.pylint from pyproject.toml

* Don't let ruff organize imports

Leave it to isort
2024-05-04 21:30:29 -07:00
Gulshan Singh 8e641929f9
Upgrade dev dependencies (#2137)
* Upgrade dev dependencies
2024-04-28 10:32:18 -07:00
Gulshan Singh 90933c3b58
Upgrade all dependencies (#2128)
* Upgrade dependencies

---------

Co-authored-by: patryk4815 <patryk.sondej@gmail.com>
2024-04-28 09:30:49 -07:00
Gulshan Singh 060106b1e6
Switch from `black` to `ruff format` in lint script (#2130)
* Update ruff version

* Switch from black to ruff format

* Reformat with ruff format

* Remove dependency on black
2024-04-25 13:29:19 +02:00
charif 7df87c93c6
improve kbase (#2097)
Fix kbase for newer kernels and allow automatically rebasing kernel symbol information
2024-04-19 13:11:39 -07:00
jetchirag ebcff7cd59
WIP: Fix Flake8 warnings (#2101)
* Fix F811

Signed-off-by: Chirag Aggarwal <thechiragaggarwal@outlook.com>

* A003 doesn't flag anymore, rule was changed

Signed-off-by: Chirag Aggarwal <thechiragaggarwal@outlook.com>

* W505

Signed-off-by: Chirag Aggarwal <thechiragaggarwal@outlook.com>

* Revert "W505"

This reverts commit 2494a34c20.

* Revert "A003 doesn't flag anymore, rule was changed"

This reverts commit d342ac7aae.

* Removed a commented line

Signed-off-by: Chirag Aggarwal <thechiragaggarwal@outlook.com>

* Mistakenly modified another variable

Signed-off-by: Chirag Aggarwal <thechiragaggarwal@outlook.com>

* Replace not None assertion to not empty string

Signed-off-by: Chirag Aggarwal <thechiragaggarwal@outlook.com>

---------

Signed-off-by: Chirag Aggarwal <thechiragaggarwal@outlook.com>
2024-04-12 14:55:50 +02:00
jetchirag e7548c7f14
Fix flake8 warnings (#2100)
* Initial commit for running GH tests

Signed-off-by: Chirag Aggarwal <thechiragaggarwal@outlook.com>

* Removed/Fixed unused variables - flake8 F841 warnings

Signed-off-by: Chirag Aggarwal <thechiragaggarwal@outlook.com>

---------

Signed-off-by: Chirag Aggarwal <thechiragaggarwal@outlook.com>
2024-03-27 16:38:48 +01:00
dependabot[bot] f55198b6e1
Bump black from 24.2.0 to 24.3.0 (#2079)
Bumps [black](https://github.com/psf/black) from 24.2.0 to 24.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.2.0...24.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-21 22:17:14 +01:00
Gulshan Singh da817b2378
Install dev dependencies with poetry (#2065)
* Add dev dependencies to pyproject.toml

* Add poetry.toml file

* Remove dev-requirements and install dev dependencies with poetry

* Update pwndbg.nix
2024-03-11 17:42:16 +01:00
Gulshan Singh da3f0f3b26
Re-enable attr-defined typecheck error for some modules (#2060) 2024-03-04 10:58:26 -08:00
Gulshan Singh c2b96d268f
Add more type annotations (#2059) 2024-03-04 09:39:02 -08:00
Gulshan Singh 037cb8a1f4
Re-enable name-defined type checks in auxv.py (#2058) 2024-03-04 00:53:07 -08:00
Gulshan Singh d346499d19
Add ipython as a dependency (#2041) 2024-03-03 21:56:38 +01:00
Gulshan Singh 3d57de2eda
Enable more lint checks (#2048)
* pyupgrade py36-plus

* Enable ruff C4 checks and fix issues

* Enable ruff ISC checks and fix issues

* Enable ruff SLOT checks and fix issues

* Enable ruff FLY checks and fix issues

* Enable some RET ruff checks and fix errors

* Enable PGH ruff checks and fix errors

* Fixed some more lint issues
2024-03-02 14:22:10 -08:00
Gulshan Singh 5ab3ed0888
Update dev requirements (#2046)
* Update dev-requirements

* Reformat after black upgrade

* Update ruff configuration after version upgrade

* Fix new ruff errors
2024-03-02 11:20:14 -08:00
Gulshan Singh 03f4dd0638
Disallow any-generics (#2045) 2024-03-02 10:56:21 -08:00
Matt 0cb1ce61d4
Add support for glibc heap UAF detection (#1841)
* Add support for breaking on UAF

* Small fixes and documentation

* Add a command to enable and disable tracking, better diagnostics

* Add initial support for calloc and realloc

* Better safeguard against matching ld.so malloc

* Small fixes

* Better interface for managing the heap tracker. More terse and information dense diagnostics

* Add warning and fix lints

* Update poetry lock
2024-02-25 01:31:06 +01:00
Disconnect3d e8f423ac4f
Prepare 2024.02.14 release (#2020) 2024-02-14 19:50:03 +01:00
Disconnect3d fe27e16a14
Fix Pwndbg on Py3.12: add setuptools as dependency (#2008)
It turned out that in some cases - e.g. when installing Pwndbg on Fedora 39 which uses Python 3.12, Pwndbg does not work failing with:

```
Traceback (most recent call last):
  File "/home/hhlp/.pwndbg/gdbinit.py", line 74, in <module>
    import pwndbg  # noqa: F401
    ^^^^^^^^^^^^^
  File "/home/hhlp/.pwndbg/pwndbg/__init__.py", line 9, in <module>
    import pwndbg.commands
  File "/home/hhlp/.pwndbg/pwndbg/commands/__init__.py", line 24, in <module>
    from pwndbg.heap.ptmalloc import DebugSymsHeap
  File "/home/hhlp/.pwndbg/pwndbg/heap/ptmalloc.py", line 18, in <module>
    import pwndbg.disasm
  File "/home/hhlp/.pwndbg/pwndbg/disasm/__init__.py", line 14, in <module>
    import capstone
  File "/home/hhlp/.pwndbg/.venv/lib/python3.12/site-packages/capstone/__init__.py", line 326, in <module>
    import distutils.sysconfig
ModuleNotFoundError: No module named 'distutils'
(gdb) 
```

It turns out that `distutils` package was removed in Python 3.12 and it is now provided by the `setuptools` module.

This commit fixes this issue by adding `setuptools` as a direct Pwndbg dependency.
2024-02-01 16:43:08 +01:00
psondej ff8ecada5c pyproject.toml: use upstream gdb-pt-dump 2023-11-16 08:38:11 +01:00
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
2023-11-02 03:10:36 +01:00
disconnect3d 5755aabaee Fixes 1777: update Pwntools to 4.11 2023-09-28 19:53:12 +02:00
Patryk Sondej f3914e2696 init add portable pwndbg using nix, package for rpm,deb,arch,alpine
Signed-off-by: Patryk Sondej <patryk.sondej@gmail.com>
2023-08-06 16:16:53 +02:00
Disconnect3d 9e9f328ccc
Update code to Python >= 3.8 (#1840)
* isort: import __future__ annotations & pyupgrade to 3.8

* dev-requirements.txt: update vermin to 1.5.2 & dont use --quiet

* pyupgrade 3.8 fixes

* fixes

* update vermin to 3.8-
2023-07-26 02:08:39 +02:00
Gulshan Singh 487afacc7a
Switch from flake8 to ruff (#1696) 2023-05-04 00:42:40 -07:00
lebr0nli 5a1c10ef51 Ignore missing `rich` module for mypy 2023-02-16 03:27:25 +00:00
Maria fd14aa0e55 Add Support for Rizin
Rizin is a fork of Radare2 with almost near perfect command compatibility with r2. Any r2 related plugins need to be replaced with their rz counter parts. Solves #1566
2023-02-15 16:14:51 +00:00
Gulshan Singh 47e4e09db2
Fix more pylint warnings (#1520)
* Fix super lint issues

* Fix chained comparison lint warnings

* Fix consider-using-in lint warnings

* Fix miscellaneous lint issues

* Fix consider-using-from-import lint warnings

* Fix some pointless-string-statement lint warnings
2023-01-11 12:53:38 -08:00
Gulshan Singh 20f9c8d941
Update pylint config and fix lint issues (#1519)
* Add pylint config

* Fix pylint issues
2023-01-11 12:17:14 -08:00
Gulshan Singh bc59a8eddd
Fix memoize type issues and enable mypy in lint script (#1518)
* memoize type fixes

* Add mypy to lint script

* Add mypy to dev-requirements.txt
2023-01-11 13:39:30 +01:00
Gulshan Singh 7e519bb660
Fix some misc type errors (#1509)
* Fix some misc type errors

* Add missing return type hints
2023-01-06 23:19:02 -08:00
Gulshan Singh 3a45e3c669
pwndbg.gdb.regs type fixes (#1508) 2023-01-06 20:57:01 -08:00
Gulshan Singh 10228899e6
More type fixes (#1506)
* More type fixes

* Properly handle missing imports during typechecking

* Fix endian type
2023-01-05 00:12:03 -08:00
Gulshan Singh 65462f63dd
Refactor nearpc (#1498) 2023-01-04 17:10:04 -08:00
Gulshan Singh fef5077eef
Fix type issue in ida.py (#1474) 2022-12-26 16:10:26 -08:00
Gulshan Singh c53ad59aae
More type fixes (#1473) 2022-12-26 15:33:34 -08:00