hyperpwn_client.sh can't function normally when combined with pwntools
syheliel opened this issue · 1 comments
syheliel commented
This question is simliar to issue 5.
environment
kali 2020.4
problem
python script
I have the following python script:
from pwn import *
context.clear(arch='amd64')
context.log_level = 'debug'
context.terminal = ['~/hyperpwn-client.sh']
filename = "ls"
sh = gdb.debug(filename) # type: pwnlib.tubes.process.process
run result
then i run it in terminal with an opening hyper terminal which runs the server, but the ~/hyperpwn-client.sh doesn't take effect
[DEBUG] Received 0x38 bytes:
'Process ls created; pid = 16673\n'
'Listening on port 44169\n'
[DEBUG] Wrote gdb script to '/tmp/pwnkaSrGb.gdb'
target remote 127.0.0.1:44169
[*] running in new terminal: /usr/bin/gdb -q "/usr/bin/ls" -x /tmp/pwnkaSrGb.gdb
[DEBUG] Launching a new terminal: ['~/hyperpwn-client.sh', '/usr/bin/gdb -q "/usr/bin/ls" -x /tmp/pwnkaSrGb.gdb']
[*] Stopped process '/usr/bin/ls' (pid 16673)
but if i run~/hyperpwn-client.sh '/usr/bin/gdb -q "/usr/bin/ls" -x /tmp/pwnkaSrGb.gdb'
on terminal, it can function normally
bet4it commented
Use full path:
context.terminal = ['/home/kali/hyperpwn-client.sh']