Created
April 18, 2019 17:32
-
-
Save keddad/6fe52701500153e26dca8eb859edd2c7 to your computer and use it in GitHub Desktop.
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 * | |
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