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>
2 years ago
dependabot[bot]
6139d0b030
Bump idna from 3.6 to 3.7 ( #2113 )
...
Bumps [idna](https://github.com/kjd/idna ) from 3.6 to 3.7.
- [Release notes](https://github.com/kjd/idna/releases )
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst )
- [Commits](https://github.com/kjd/idna/compare/v3.6...v3.7 )
---
updated-dependencies:
- dependency-name: idna
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
smiley
edfbd595fc
when gdb.execute throws an error in symbol.get return "" ( #2094 )
...
* when gdb.execute throws an error in symbol.get return ""
fixes: https://github.com/pwndbg/pwndbg/issues/2080
* Update pwndbg/gdblib/symbol.py
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
2 years ago
Aryaman Sharma
6b521b2e08
search --asm: set breakpoint on found instructions ( #2103 )
...
* feat:breakpoint on asm search results
* formatted changes
* --asmbp as an independent flag
* Update pwndbg/commands/search.py
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
2 years ago
Gulshan Singh
eb3ed7c41b
Add more flags to SCTLR register ( #2111 )
2 years ago
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>
2 years ago
jetchirag
66740fc803
Cleaned up compatibility code for unsupported gdb version in cymbol command ( #2099 )
...
Signed-off-by: Chirag Aggarwal <thechiragaggarwal@outlook.com>
2 years ago
jetchirag
6d12d2f3d8
Cleaned up compatibility code for gdb < 9.2 ( #2092 )
...
* Cleaned up compatibility code for gdb < 9.2
Signed-off-by: Chirag Aggarwal <thechiragaggarwal@outlook.com>
* Removed GDB version from docstrings
Signed-off-by: Chirag Aggarwal <thechiragaggarwal@outlook.com>
---------
Signed-off-by: Chirag Aggarwal <thechiragaggarwal@outlook.com>
2 years ago
Disconnect3d
7828ec504f
README: update gdb build commands ( #2093 )
2 years ago
Disconnect3d
4f4b677ddb
README: update gdb build steps ( #2089 )
2 years ago
RoboSchmied
2ef3f983ab
Fix: 6 typos ( #2088 )
...
Signed-off-by: Michael Seibt <github@roboschmie.de>
2 years ago
Divyansh Singh
83d8d95b57
search --asm: look for assembly instruction's bytes ( #2081 )
...
* feat: search for assembly instruction's bytes
* formatting changes
2 years ago
Uros Lazic
8d067127a7
add archcraft to the list of arch-based distros ( #2083 )
...
Co-authored-by: Uros Lazic <uros.lazic@protonmail.com>
2 years ago
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>
2 years ago
Divyansh Singh
a75b150242
show `mypy` errors inline on PRs ( #2075 )
...
show mypy errors inline on PRs
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com>
Co-authored-by: Gulshan Singh <gsingh2011@gmail.com>
2 years ago
Divyansh Singh
c0d785565b
Accept heap dereference limit ( #2077 )
...
* accept heap-dereference-limit
* accept heap-dereference-limit
2 years ago
Divyansh Singh
f1f8fa0e43
make prepush hook executable ( #2076 )
2 years ago
Gulshan Singh
06257f2f3f
Return `int` in `fix_int_reraise` ( #2061 )
...
* Return int in fix_int_reraise
* Remove redundant casts to int
* Don't use fix_reraise instead of fix_int_reraise if action type is unspecified
2 years ago
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
2 years ago
Tcc100
2a50da82ff
Restore stack frame after display ( #2069 )
...
The commands `context threads` and `threads` use `thread.switch()` to examine other threads, which resets the selected stack frame to `#0`. This commit restores the selected frame afterwards.
Co-authored-by: T <T>
2 years ago
nu1lptr
bb5de91228
Update setup.sh ( #2073 )
...
Gentoo gdb package have been changed to dev-debug/gdb and emerge command needs root privilege to run.
2 years ago
Liu Jiayin
600da35bee
Update context.py ( #2072 )
...
lint
2 years ago
Gulshan Singh
45665e823c
Make ruff output in github format if running on CI ( #2070 )
2 years ago
Disconnect3d
638cd45e5e
asm command: fix default arch ( #2066 )
...
Before this commit, running `asm mov rax, 0xdeadbeef` would not work on amd64 targets because the default arch was set in the argparse default argument value and it was populated once.
Now, this `default=...` kwarg is not set and instead we fetch current arch inside the `asm` command directly when the user did not pass any architecture value.
2 years ago
Pratik Raj
d209d9a3b3
feat : use "PIP_NO_CACHE_DIR" env with pip in dockerfiles to save space ( #2068 )
...
using the "PIP_NO_CACHE_DIR" env with pip install, make sure downloaded packages by pip don't cache on the system. This is a best practice that makes sure to fetch from a repo instead of using a local cached one. Further, in the case of Docker Containers, by restricting caching, we can reduce image size. In terms of stats, it depends upon the number of python packages multiplied by their respective size. e.g for heavy packages with a lot of dependencies it reduces a lot by don't cache pip packages.
Further, more detailed information can be found at
https://medium.com/sciforce/strategies-of-docker-images-optimization-2ca9cc5719b6
Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
2 years ago
Gulshan Singh
994505b8be
Update types-gdb version ( #2064 )
...
* Update dev-requirements
* Remove type ignore comment for gdb.VERSION
2 years ago
Gulshan Singh
da3f0f3b26
Re-enable attr-defined typecheck error for some modules ( #2060 )
2 years ago
Gulshan Singh
c2b96d268f
Add more type annotations ( #2059 )
2 years ago
Gulshan Singh
f797b0ae90
Fix setflags commands for multibit flags ( #2057 )
2 years ago
Gulshan Singh
037cb8a1f4
Re-enable name-defined type checks in auxv.py ( #2058 )
2 years ago
Gulshan Singh
5be38a5bf3
Add test for setflags command ( #2056 )
2 years ago
Gulshan Singh
8a09a89c34
Fix pwndbg.auxv.get() ( #2055 )
2 years ago
Gulshan Singh
30ecebe7ee
Add type hint for cache_until ( #2051 )
...
* Add type hint for cache_until
* Use properties in AUXV class
* Add parse_flags argument to info_proc_maps()
2 years ago
Niko
4423ae6322
[Docs] remove revision date from docs ( #2054 )
...
* remove revision date from docs
* disable git-committers
* Add site_url to mkdocs
* fix mkdocs griffe issue
2 years ago
Gulshan Singh
d346499d19
Add ipython as a dependency ( #2041 )
2 years ago
patryk4815
7f9ae113d1
nix: cryptography: disable build from source, because rust hash had to be repaired many times, see: eg. https://github.com/pwndbg/pwndbg/pull/2024 ( #2052 )
2 years ago
Gulshan Singh
6a85949ff7
Add codecov badge to README ( #2049 )
...
* Add codecov badge to README
* Update README.md
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
2 years ago
Gulshan Singh
80aa9eb76c
Improve events decorator typing ( #2050 )
2 years ago
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
2 years ago
Gulshan Singh
3e855ad220
Allow fixing ruff errors in lint.sh ( #2047 )
2 years ago
Gulshan Singh
5ab3ed0888
Update dev requirements ( #2046 )
...
* Update dev-requirements
* Reformat after black upgrade
* Update ruff configuration after version upgrade
* Fix new ruff errors
2 years ago
Gulshan Singh
03f4dd0638
Disallow any-generics ( #2045 )
2 years ago
Gulshan Singh
66df243bd6
Add SCR and SCTLR AArch64 register flags ( #2043 )
2 years ago
Gulshan Singh
a7e7d468b3
Add stepuntilasm to 'next' command category ( #2042 )
2 years ago
Gulshan Singh
604d2e4067
Allow using regs command for any valid register ( #2039 )
2 years ago
Gulshan Singh
8496d1a428
Add extra_flags to register sets ( #2037 )
2 years ago
Gulshan Singh
ba8c7bdece
Fix exception in repeated command function ( #2038 )
2 years ago
Gulshan Singh
5c5bf5ae3a
Fix regs command ( #2036 )
2 years ago
Alan Li
c8292e8f1d
Add a helper command for one_gadget ( #2018 )
...
* Add a helper command to find valid one_gadget for current context
* Refactor the function for getting section address
* Rename the command to onegadget for more convenient typing
* Make the output format cleaner
* Add a simple cache mechanism for the one_gadget output
* Update the warning message
* Use MD5 instead of BLAKE2 for computing the file hash
I thought that BLAKE2 was faster than MD5, but it doesn't seem correct here somehow (probably because of the implementation of Python!?)
Here's the script I used for benchmarking:
```python
import hashlib
import timeit
def compute_file_hash_1() -> str:
h = hashlib.blake2b()
with open("/lib/x86_64-linux-gnu/libc.so.6", "rb") as f:
h.update(f.read())
return h.hexdigest()
def compute_file_hash_2() -> str:
h = hashlib.md5()
with open("/lib/x86_64-linux-gnu/libc.so.6", "rb") as f:
h.update(f.read())
return h.hexdigest()
print(timeit.timeit(compute_file_hash_1, number=1000))
print(timeit.timeit(compute_file_hash_2, number=1000))
```
I executed the above script on various machines, and the results seem to show that MD5 outperforms BLAKE2 in this scenario. (On my x86 VM running through QEMU on my M1 MacBook, BLAKE2 even takes almost twice as long as MD5.)
* Add the tests for `onegadget` command
* Fix lint issue
* Try to cover more code
* Fix lint issue
* Fix illogical tests
* Rename one_gadget to onegadget
* Use `pwndbg.lib.tempfile.cachedir` for `onegadget`
* Call `pwndbg.lib.tempfile.cachedir` only once
2 years ago
Disconnect3d
379f680885
README.md: fix cheatsheet link ( #2035 )
2 years ago