Skip to content

Instantly share code, notes, and snippets.

View momansoury's full-sized avatar
❄️
cool

Mohammad Mansoury momansoury

❄️
cool
View GitHub Profile
@richarddun
richarddun / gist:1bb11d32cafc394efbcb8f4a8b6cb130
Last active January 30, 2025 19:33
scapy script to send http requests
#!/usr/bin/env python
"""
Script to open TCP connection and send 1 HTTP GET request containing
a specific string, and header
Usage:
./http.py <IP_of_target>
There is only one mandatory argument, which is the target IP address.
@nenodias
nenodias / web_proxy.py
Last active May 18, 2018 10:14
Python Forwarding Proxy
# *-* coding: utf-8 *-*
import socket, sys
import threading
def tratando_host(host_proxy):
host_proxy = host_proxy.replace("Host: ", "")
index_prota_proxy = host_proxy.find(":")
port_proxy = host_proxy[index_prota_proxy:].replace(":","").replace("\r\n","") if index_prota_proxy != -1 else 80
port_proxy = int(port_proxy)
return (host_proxy, port_proxy)
@miratcan
miratcan / fblogin.py
Created January 2, 2016 10:06
FB Login Brute Force (Requires mechanize module)
import itertools
import sys
from time import sleep
import mechanize
CHRS = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
MOZILLA_UAS = 'Mozilla/5.0 (X11; U; Linux i686; en-US) ' \
'AppleWebKit/534.7 (KHTML, like Gecko) ' \
@krzysiek84
krzysiek84 / air.py
Last active August 4, 2018 16:03
Sharing file on localhost using python (Air Drop Alike)
# -*- coding: utf-8 -*-
#!/usr/bin/env python
# Created By Krzysztof Nowak
# Licensed under MIT (http://opensource.org/licenses/MIT)
#
# Script allows sharing file over LAN.
# It copies file into tmp directory on the computer and then shares the tmp directory
#
@gkbrk
gkbrk / slowloris.py
Last active December 20, 2024 00:02
Slowloris implementation in Python. https://github.com/gkbrk/slowloris
import socket
import random
import time
import sys
log_level = 2
def log(text, level=1):
if log_level >= level:
print(text)
@Preston-Landers
Preston-Landers / pyuac.py
Last active May 26, 2025 13:44
pyuac - elevate a Python process with UAC on Windows
#!/usr/bin/env python
# -*- coding: utf-8; mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vim: fileencoding=utf-8 tabstop=4 expandtab shiftwidth=4
"""
THIS CODE IS OUTDATED! Please use this instead:
https://pypi.org/project/pyuac/
https://github.com/Preston-Landers/pyuac
@eXenon
eXenon / ssl.py
Last active December 4, 2021 18:57
Quick SSL Packet Parser / Builder
# Constants - taken from dpkt/ssl.py
import struct
# SSLv3/TLS versions
SSL3_V = 0x0300
TLS1_V = 0x0301
TLS11_V = 0x0302
TLS12_V = 0x0303
@eXenon
eXenon / scapy_bridge.py
Last active May 12, 2024 03:00
Use scapy as a modifying proxy
#!/usr/bin/python2
"""
Use scapy to modify packets going through your machine.
Based on nfqueue to block packets in the kernel and pass them to scapy for validation
"""
import nfqueue
from scapy.all import *
import os
@itsbalamurali
itsbalamurali / proxy.py
Created October 24, 2014 11:59
proxy
#! /usr/bin/env python
import os, socket, thread, select
__version__ = '0.1.0 Draft 1'
BUFLEN = 8192
VERSION = 'Python Proxy/'+__version__
HTTPVER = 'HTTP/1.1'
class ConnectionHandler:
@albardol
albardol / proxy.py
Created July 25, 2014 18:56
Api proxy
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from werkzeug.wrappers import Request, Response
from werkzeug.wsgi import responder
from werkzeug.serving import run_simple
from werkzeug.routing import Map, Rule
from StringIO import StringIO
from httplib import HTTPResponse
import requests