sensepost / birp

Big Iron Recon & Pwnage
125 stars 33 forks source link

impossible to run interactive mod #6

Closed milcaca closed 6 years ago

milcaca commented 7 years ago

I compiled birp and x3270 on kali and on BlackArch with same result. I get the folowing stack trace :

Traceback (most recent call last): File "birp.py", line 544, in menu(em, history) File "birp.py", line 469, in menu interactive(em,history) File "birp.py", line 180, in interactive if not em.is_connected(): File "/usr/lib/python2.7/site-packages/py3270/init.py", line 328, in is_connected self.exec_command(b'ignore') File "/usr/lib/python2.7/site-packages/py3270/init.py", line 291, in exec_command c.execute() File "/usr/lib/python2.7/site-packages/py3270/init.py", line 69, in execute return self.handle_result(result.decode('ascii')) File "/usr/lib/python2.7/site-packages/py3270/init.py", line 87, in handle_result raise CommandError(msg.decode('ascii')) py3270.CommandError: Unknown action: ignore

The files have been moved in the new version of x3270 (3.5ga11 stable (26. June 2017)) So the patch doesn't work straight forward. I'm not sure all the lines are correctly patched, I'll check that tomorrow.

incendiary commented 7 years ago

Not sure how maintained this is, so what I did was:

patch -p1 < x3270-hack-full.patch
patching file ctlr.c
Hunk #1 FAILED at 334.
Hunk #2 succeeded at 449 (offset -7 lines).
Hunk #3 succeeded at 1154 (offset -7 lines).
Hunk #4 succeeded at 1166 (offset -7 lines).
[...]
        x3270App.executable = '/usr/local/bin/x3270'
        s3270App.executable = '/usr/bin/s3270'

Not 100% sure it works, as waiting for a target, but maybe it helps you or others out? At least, I don't get the error you get, and a copy of x3270 pops up with the following output from Birp:

./birp.py -t 10.0.0.1:23
[+] Big Iron Recon & Pwnage (BIRP) by @singe
[+] Target Acquired     : 10.0.0.1:23
[+] Slowdown is         : 0
[+] Attack platform     : Linux
[+] Connecting to 10.0.0.1:23
[#] Connection failure

I'll update if it doesnt work when I get a target.

singe commented 6 years ago

@milcaca's error was related to a change in the script API, where the 'ignore' command no longer exists. I've got a pull request out with py3270 to fix it https://github.com/py3270/py3270/pull/13 In the meantime use mine at https://github.com/singe/py3270

@incendiary's error is different. I've updated the patch for suite3270 for the latest stable version (3.6ga4) as per https://github.com/sensepost/birp/commit/ada0167938b0627027ecee2b316b6531cf3a40df