Skip to content

Instantly share code, notes, and snippets.

View angeloped's full-sized avatar

Angeloped angeloped

  • Philippines
View GitHub Profile
@angeloped
angeloped / dump.py
Last active December 28, 2021 13:05
A fork of dump.py from the requests_toolbelt `requests` utility extension.
"""This module provides functions for dumping information about responses."""
"""
This is a fork of dump.py from requests_toolbelt.
https://github.com/requests/toolbelt/blob/master/requests_toolbelt/utils/dump.py
"""
import collections
from requests import compat
@angeloped
angeloped / 2serv.py
Created December 19, 2021 18:41 — forked from phrawzty/2serv.py
simple python http server to dump request headers
#!/usr/bin/env python2
import SimpleHTTPServer
import SocketServer
import logging
PORT = 8000
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
@angeloped
angeloped / strip_header.c
Created December 19, 2021 15:27
Strip HTTP header in C language.
const char* pattern = "\r\n\r\n";
const char* patp = pattern;
while ((numbytes = recv(socket_file_descriptor, buf, MAXDATASIZE - 1, 0)) > 0) {
for (int i = 0; i < numbytes; i++) {
if (*patp == 0) {
fwrite(buf + i, 1, numbytes - i, fp);
break;
}
else if (buf[i] == *patp) ++patp;
else patp = pattern;
@angeloped
angeloped / sockettor.py
Last active December 19, 2021 15:23
Client request on .onion domains through TOR proxy.
import socks
import socket
host = 'ifconfig.me'
host = 'libraryqtlpitkix.onion'
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050, True)
s = socks.socksocket()
s.connect((host, 80))
message = "GET / HTTP/1.1\r\nHost: {0}\r\n\r\n".format(host)
@angeloped
angeloped / proxy_clnt_socket.py
Last active December 15, 2021 22:20
Connect socket client to proxy in Python.
#!/usr/bin/python
import socks
import socket
################################################################################
# title: Proxy Client Socket
# author: Bryan Angelo Pedrosa
# date: 12/15/2021
################################################################################
@angeloped
angeloped / SimpleTcpRedirector.py
Created December 14, 2021 22:23 — forked from sivachandran/SimpleTcpRedirector.py
A simple TCP redirector in python
#!/usr/bin/env python
import socket
import threading
import select
import sys
terminateAll = False
class ClientThread(threading.Thread):
@angeloped
angeloped / http_proxy_connect.py
Created December 13, 2021 09:50 — forked from frxstrem/http_proxy_connect.py
Establish a socket connection through an HTTP proxy in Python.
'''
Establish a socket connection through an HTTP proxy.
Author: Fredrik Østrem <frx.apps@gmail.com>
License:
Copyright 2013 Fredrik Østrem
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without
@angeloped
angeloped / fl00d3r.py
Created September 20, 2021 14:28
Urllib message fl00der demonstration.
import sys
import time
import thread
import urllib
global sent, error
sent = error = 0
def _send(tgt, msg):
global sent, error
@angeloped
angeloped / shutd0wn.py
Created September 18, 2021 08:57
Automated WiFi Network Attaxx0r. For TikTok demonstration by @sherl0ck__
#!/usr/bin/python
# Automated WiFi Network Attaxx0r.
# For TikTok demonstration by @sherl0ck__
# usage: [sudo ] python shutd0wn.py <Target MAC AP> <Target AP Channel> <Interface>
# created: 9/18/21
import time
import sys
import os
@angeloped
angeloped / sigmoid.py
Created August 27, 2021 09:26
A purely pythonic implementation of Sigmoid function without external module.
# sigmoid.py
# A purely pythonic implementation of Sigmoid function
# without external module.
e=2.7182818284590452
def sigmoid(x):
return (1 / (1 + (e**-x)))