Commit Graph

19 Commits

Author SHA1 Message Date
Aaron Adams b4d6d5cbb8
Add nix development shell (#2166) 2024-06-25 01:42:34 +02:00
Matt 9111977c29
Add Vim's `*.swp` files to .gitignore (#2207) 2024-06-05 08:12:42 -07:00
Niko 561169d97c
Add new docs theme with commands documentation. (#1999) 2024-01-10 19:13:51 +01:00
disconnect3d 64a4bd1f5e Fix nix release build 2023-08-06 17:22:20 +02:00
intrigus-lgtm c54d040f06
Fix/ignore venv restrict bind mount (#1796)
* Ignore .venv files in git and docker

* Only bind mount cwd for `main`

Bind mounting `.` in every case would interfere with .dockerignore
We want to ignore `.venv` so that the venv of the built docker image
is used. Otherwise we would use the venv of the host inside docker.
This would negate the whole point of testing in a docker container.

Bind mounting `.` is however useful if one wants to use docker just
for "sandboxing" while running the tests on the local machine.

---------

Co-authored-by: intrigus <abc123zeus@live.de>
2023-07-13 11:27:40 +02:00
Olivia Lucca Fraser ce8e72eed1
ai tool now uses ChatGPT model (#1614)
* ai plugin

* ai plugin ready to ship

* ai plugin ready to use

* textwrap on the ai's answer

* linted ai.py

* relaxed openai version requirement

* added pandas to requirements

* removed dependency on openai module, using requests instead

* removed dependency on openai module, using requests instead

* incorporating suggestions on PR

* added types requests and bumped requests version up to the version i'm using here

* lowering version req on requests for ubuntu 18 compat

* removed some 'if True' kludges that i was using to debug things at one point

* better error handling

* more config parameters for ai

* fixed a few config issues

* fixed bug in gdb list command

* now uses chatgpt's gpt-3.5-turbo model, instead of text-davinci-003, and follows a conversational protocol instead of completion.

* ensuring backwards compatibility with older models, like text-davinci-003

* removed unneeded host and path vars
2023-03-09 02:32:34 +01:00
Gulshan Singh 0757878b80 Update qemu image download script 2023-01-18 19:43:18 -08:00
Gulshan Singh d4562ea462
Update qemu test scripts and images (#1529) 2023-01-17 20:47:30 -08:00
Gulshan Singh 9a67233cd1 Store coverage files in .cov directory 2022-10-18 14:21:22 -07:00
Gulshan Singh e63d289b95 Move tests/ to tests/gdb-tests/ 2022-10-18 11:00:30 -07:00
Gulshan Singh 2b62259d7e
GDB Refactor [2/N]: move some modules to lib/ (#1118)
* Don't exclude pwndbg/lib in .gitignore

* Move which.py to lib/which.py

* move funcparser.py and functions.py to lib/

* moved version.py to lib/

* Move tips.py to lib/

* Update pwndbg/lib/version.py

Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
2022-09-05 13:23:20 +02:00
Gulshan Singh 7c53bdeaa8
Minor test cleanup (#1099)
* Silence nonnull warning when building heap_vis.c

* Fix checking ptrace_scope in test_attachp.py

* Fix .gitignore

* tests.sh cleanup

* Fixed coverage generation
2022-08-25 16:57:16 +02:00
alufers 36ee7d238d
tools: change zig to install from a tarball (fixes: #1085) (#1089)
* tools: change zig to install from a tarball

Migrate from using snap, we install from a cheksumed tarball

* fix: add sudo

* fix: install zig to .zig in PWD

Co-authored-by: Albert Koczy <albert.koczy@asseco.pl>
2022-08-23 21:43:17 +02:00
cnwangjihe bd7c3aa2d2 add test for heap bins 2021-10-18 10:33:40 +02:00
Matteo Rizzo 45dd669a23 Make setup.sh work with Podman
Containers created with Podman (https://podman.io/) don't have a
.dockerenv file in the root directory, so setup.sh tries to invoke sudo.
This doesn't work because podman containers can't use sudo (the
processes inside the container run as an unprivileged user).
This removes the check for .dockerenv. The other checks should already
be sufficient to detect that it's running in a container without sudo.
2021-08-02 23:23:07 +02:00
Israel Alberto RV bf49bf8356
Unit test fix (#868)
* Fixed the failed unit testing; Improved the Dockerfile, again.

* Fixed missing new line joiner in the Dockerfile.

* Fixed the default Python version from 2 to 3.

* Moved the installation of the nasm and golang packages to the setup script.

* Fixed the extra quotes which fails the sudo check.

* Added to the Git ignore file the output files assembled and linked in the test binaries.

* Removed the output files from test binaries.

* Added to the Git ignore file the virtual environment directory.

* Added sudo to the remove and link the Python3 binary.

* Added commands related to GO, to check why is failing.

* Fixed the installation of GO, only install if not exists in Ubuntu.

* Fixed the first test built in Assembler. Checks if it is working in GitHub.

* Fixed the problem with all the assembler tests; Extracted the asserts into methods, avoiding duplicates.

* Fixed some test, should be fail the Travis tests.

* Fixed one test for Travis.

* Fixed the asserts, now find all ecpected items into the output.

* Fixed the split message, joined again.

* Fixed the last error test for loads binary.

* Fixed one missing number in the comparison.

* Fixed the first Lint errors.

* Added comment in the Dockerfile.

The commented line about `git submodule`.

https://github.com/pwndbg/pwndbg/pull/868#discussion_r549075767

* Removed NASM and Go from the setup.

Created a new bash script to install them and added to the Dockerfile.

https://github.com/pwndbg/pwndbg/pull/868/files#r549075931

https://github.com/pwndbg/pwndbg/pull/868/files#r549076078

* Added the setup script in the GitHub test workflow.

https://github.com/pwndbg/pwndbg/pull/868/files#r549075931

https://github.com/pwndbg/pwndbg/pull/868/files#r549076078

* Testing the emulate cases.

It should be fail. I commented the emulation for the address 0x401000.

https://github.com/pwndbg/pwndbg/pull/868#discussion_r549111511

* Fixed the different start addresses in the assembler test.

https://github.com/pwndbg/pwndbg/pull/868#discussion_r549111511

https://github.com/pwndbg/pwndbg/pull/868#discussion_r549075485

* Experimenting with the python location.

Commented the remove python binary and added some logs.

https://github.com/pwndbg/pwndbg/pull/868#discussion_r549076170

* Removed the commands about delete Python and link the Python3.

https://github.com/pwndbg/pwndbg/pull/868#discussion_r549076170
2020-12-31 04:35:52 +01:00
Disconnect3d 87aa167599
Run each test in a separate GDB session (#498)
* it would be cool to have tests that run within GDB so that we don't have to parse GDB output and deal with weird problems
* we can't run all tests in one GDB session as `file x; entry; <some pwndbg command>; file y; entry; <some wndbg command>;` may have different results - it seems either us or GDB fails to cleanup everything properly
2018-07-08 19:03:03 +02:00
Disconnect3d f728a2870a Configurable IDA Pro RPC endpoints (#139)
* Added PyCharm project dir (.idea) to .gitignore

* Reformat & optimize imports in ida xmlrpc sources

* Refactored ida_script.py

* Moved host to variable in ida_script.py

* Added info that server has been hosted in ida_script.py

* Added info to config/theme commands output

* Reformat & optimize imports in pwndbg/config.py

* Fix for configfile/themefile generation #137

Also generating the configs only for the changed parameters.

* Better info for config and theme commands

* Added Ida Pro rpc connection host, port parameters #132

* Fixed wrong Ida Pro idb save path on Windows #132

The problem happens on a NTFS filesystem as it supports ADS (Alternative
Data Streams) so that filepath with ':' is treated as ntfs ads.

* Added info on Ida Pro rpc successful connection #132

* Sorted imports with isort

* Added Ida Pro rpc auto connect when host/port has changed #132

* Better Ida Pro integration description in FEATURES.md #132

* Added info about config/theme into FEATURES.md

* Add PEP8 configuration file for pep8 command-line and PyCharm

* Review #139 fixes: ugly filter_cond cleanup

* Minor name refactor in pwndbg/config.py

* Review #139: added native_default to pwndbg.config.Parameter

* config: fix type checking of native translation by testing instance

* config: add optional 'all' parameter to {config,theme}file

this makes it easier to get a template of all configurable options.

* Removed trailing spaces in FEATURES.md
2016-12-14 16:48:55 -06:00
Zach Riggle 994afa9aef lots of WIP stuff 2015-05-09 15:25:24 -04:00