Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terminal参数指定问题 #14

Open
Zrzzzz opened this issue Oct 29, 2022 · 1 comment
Open

terminal参数指定问题 #14

Zrzzzz opened this issue Oct 29, 2022 · 1 comment

Comments

@Zrzzzz
Copy link

Zrzzzz commented Oct 29, 2022

    context.log_level = 'debug'
    context.terminal = ['tmux', 'splitw', '-h'] 
    # ctx.debug_remote_libc = True
    if args.G:
        rs('gdb', gdbscript='b read\nc')
    elif args.R:
        rs('remote')
    else:
        rs()

代码如上,使用命令python exp.py G
会报错

Traceback (most recent call last):
  File "exp.py", line 82, in <module>
    main()
  File "exp.py", line 50, in main
    rs('gdb', gdbscript='b read\nc')
  File "exp.py", line 36, in <lambda>
    rs      = lambda *args, **kwargs    :ctx.start(*args, **kwargs)
  File "/root/miniconda3/envs/pwn/lib/python3.8/site-packages/welpwn-0.97-py3.8.egg/PwnContext/core.py", line 344, in start
    self.io = binary.debug(**kwargs)
  File "/root/miniconda3/envs/pwn/lib/python3.8/site-packages/pwntools-4.9.0b0-py3.8.egg/pwnlib/elf/elf.py", line 459, in debug
    return pwnlib.gdb.debug([self.path] + argv, *a, **kw)
  File "/root/miniconda3/envs/pwn/lib/python3.8/site-packages/pwntools-4.9.0b0-py3.8.egg/pwnlib/context/__init__.py", line 1578, in setter
    return function(*a, **kw)
  File "/root/miniconda3/envs/pwn/lib/python3.8/site-packages/pwntools-4.9.0b0-py3.8.egg/pwnlib/gdb.py", line 580, in debug
    tmp = attach((host, port), exe=exe, gdbscript=gdbscript, ssh=ssh, sysroot=sysroot, api=api)
  File "/root/miniconda3/envs/pwn/lib/python3.8/site-packages/pwntools-4.9.0b0-py3.8.egg/pwnlib/context/__init__.py", line 1578, in setter
    return function(*a, **kw)
  File "/root/miniconda3/envs/pwn/lib/python3.8/site-packages/pwntools-4.9.0b0-py3.8.egg/pwnlib/gdb.py", line 1048, in attach
    gdb_pid = misc.run_in_new_terminal(cmd, preexec_fn = preexec_fn)
  File "/root/miniconda3/envs/pwn/lib/python3.8/site-packages/pwntools-4.9.0b0-py3.8.egg/pwnlib/util/misc.py", line 409, in run_in_new_terminal
    pid = int(out)
ValueError: invalid literal for int() with base 10: b''

@sln-1550
Copy link

这个不是源码的问题,只是你没有先用tmux进入shell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants