Skip to content

Instantly share code, notes, and snippets.

@keddad
Created April 18, 2019 17:32
Show Gist options
  • Save keddad/6fe52701500153e26dca8eb859edd2c7 to your computer and use it in GitHub Desktop.
Save keddad/6fe52701500153e26dca8eb859edd2c7 to your computer and use it in GitHub Desktop.
from pwn import *
def cou(g):
if (g == 1):
return 2
elif (g == 0):
return 1
else:
return (cou(g - 1)) + g
context(arch='i386', os='linux')
s = remote("tcp.vpando.ru", 53762)
string = s.recv().decode()
number = [int(s) for s in string.split() if s.isdigit()]
s.sendline(str(cou(number[-1])))
while (True):
string = s.recv()
print(string)
number = [int(s) for s in string.split() if s.isdigit()]
print(*number)
s.sendline(str(cou(*number)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment