4

I am trying to use python's pwntools. I want to start a process using

from pwn import *
s = process('./step1')

When I do this I receive the following error message:

Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/pwnlib/tubes/process.py", line 267, in init stdin, stdout, stderr, master, slave = self._handles(*handles) File "/usr/local/lib/python2.7/dist-packages/pwnlib/tubes/process.py", line 603, in _handles tty.setraw(master) File "/usr/lib/python2.7/tty.py", line 28, in setraw tcsetattr(fd, when, mode) termios.error: (22, 'Invalid argument')

I am already in the directory that contains the file step1 and step1 is executable. Does anyone have an idea why I get this error. If it helps, I am using the Linux subsystem on Windows 10.

Rincewind
  • 197
  • 1
  • 1
  • 9

1 Answers1

8

Check out this link. process() needs its first argument as a list of program arguments. So

$ ./step1 arg1 arg2

is equivalent to

p = process(['step1', 'arg1', 'arg2'])
Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
SamudNeb
  • 211
  • 2
  • 6