* attachp: add default target if not provided
Fixes#2815. The `attachp` command with no arguments will now attempt to attach to a process with the same name as the
name of the binary loaded into the debugger.
* Update pwndbg/commands/attachp.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add programatic controls to the LLDB Pwndbg CLI
* Update pwndbg-lldb.py
Co-authored-by: patryk4815 <bux.patryk@gmail.com>
* Use `sys.stdout.buffer` directly, when sensible
* Use `.execute`, not `.execute_and_capture` in pwndbg-lldb
* Small fixes
---------
Co-authored-by: patryk4815 <bux.patryk@gmail.com>
* Reduce context shaking when quickly stepping
by reserving empty lines after the command prompt
* clarify the extra lines property
* add config option
* disable line-reservation for tests
* lint
* Separate tips for GDB, Pwndbg and LLDB
* Fix linting issues
* Fix docstring formatting
* Remove redundant TIPS variable as suggested
* Fix: Update tips command to work with separated debugger tips
- Removed TIPS variable for backward compatibility
- Added get_all_tips() function to retrieve appropriate tips based on debugger
- Updated tips.py to use get_all_tips() instead of importing TIPS
- Modified get_tip_of_the_day() to use pwndbg.dbg.is_gdblib_available()
* fix lint
* fix lint
* Simplify get_tip_of_the_day() by using get_all_tips()
* Update tips.py
* Update tips.py fix lint
---------
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
We're now using `writelines` to output the context data which wasn't implemented
for the CallOutput redirection layer. Add a smoke test for that output redirection.
Refs #2654
* commands/config.py: minor refactor
* config command: fix boolean parameter displays
Fixes#2748: a bug/bad UX where `config` command displayed the boolean
parameter values as `True` or `False` while setting them with `set
<param> <value>` requires passing `on` or `off`.
This commit makes it so that the `on` or `off` is shown instead.
* Fix lint
* Allow dumpargs to format bit flags
If flags are supplied for a funciton in `functions_data.py`, the
`dumpargs` command can pretty-print the combination of flags used in the
call.
* Update format for flags arguments.
The format now includes the original integer value *and* the extracted
flag names (if any). A sample output would be `0x03 (FLAG_2|0x01)`.
* Fix lint
* Address review comments
* Remove import after rebase
---------
Co-authored-by: Loren Van Spronsen <lorenvs@google.com>
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
Set the parameter in gdb to the new value when the abstraction in
pwndbg.lib.config.Parameter changes. This makes sure other commands
accessing the value in gdb like "show <parameter>" display the correct value.
Fixes#2744
This commit fixes#2674. A bug in commands.context implementation where we printed out the banner without a newline when context was forwarded to separate terminals.
Use the `PWNDBG_[BINJA|IDA]_SERVER_HOST` and `PWNDBG_[BINJA|IDA]_SERVER_PORT`
environment variables to specify where the XMLRPC server should listen on.
This allows you to change the host to e.g. "0.0.0.0" to allow connecting from WSL to an
IDA/Binja running on Windows without having to touch the scripts everytime.
* Fix remote procinfo error due to error in opening SELinux attribute file. Bring full functionality to xinfo on remote hosts
* Move try-catch block closer to function that raises error