Tags: pwntools python coding 

Rating:

Eval is useful to do operation.
```
#!/usr/bin/python
from pwn import *
p = connect("chals20.cybercastors.com",14429)
print p.recv()
p.send('\n')
while True:
data = p.recv().split(' ')
print data
one,two,three,four,five,six,seven,eight,nine=1,2,3,4,5,6,7,8,9
if data[3] == "minus":
data[3] = "-"
if data[3] == "plus":
data[3] = "+"
if data[3] == "divided-by":
data[3] = "//"
if data[3] == "multiplied-by":
data[3] = "*"
result = eval(str(data[2])+data[3]+str(data[4]))
print result
p.send(str(result))
print p.recv()
```