Skip to content

Instantly share code, notes, and snippets.

View webcoderz's full-sized avatar

webcoderz

View GitHub Profile
@JamoCA
JamoCA / regexlib-raw.txt
Created September 23, 2019 21:54
RXXR2 regular expression static analyzer
# 20161122 https://github.com/ConradIrwin/rxxr2/blob/master/data/input/regexlib-raw.txt http://www.cs.bham.ac.uk/~hxt/research/rxxr2/
# This will find URLs in plain text. With or without protocol. It matches against all toplevel domains to find the URL in the text.
# ID: 1016
([\d\w-.]+?\.(a[cdefgilmnoqrstuwz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvxyz]|d[ejkmnoz]|e[ceghrst]|f[ijkmnor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eouw]|s[abcdeghijklmnortuvyz]|t[cdfghjkmnoprtvwz]|u[augkmsyz]|v[aceginu]|w[fs]|y[etu]|z[amw]|aero|arpa|biz|com|coop|edu|info|int|gov|mil|museum|name|net|org|pro)(\b|\W(?<!&|=)(?!\.\s|\.{3}).*?))(\s|$)
# Retrieves all anchor links in a html document, useful for spidering. You will need to do a replace of " and ' after the regular expression, as the expression gets all links. As far as I know there is no way, even with \1 groupings, of getting a condition on whether the link
@ustayready
ustayready / google_lure.py
Last active September 23, 2024 20:18
Generate phishing lures that exploit open-redirects from www.google.com using Google Docs
from __future__ import print_function
import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from apiclient import errors
import re
from bs4 import BeautifulSoup as Soup
import streamlit as st
import aiohttp
import asyncio
async def fetch(session, url):
try:
async with session.get(url) as response:
result = await response.json()
return result
@ruiqic
ruiqic / transfer_spl_token.py
Last active January 8, 2025 22:04
Simple python script to transfer an SPL token using solana-py library. Keypair for Pub and Private key are to generated/derived using bip_utils library.
from solana.rpc.async_api import AsyncClient
from solana.transaction import Transaction
from spl.token.instructions import get_associated_token_address, transfer_checked, TransferCheckedParams
from spl.token.constants import TOKEN_PROGRAM_ID
from solders.pubkey import Pubkey
from solders.keypair import Keypair
from solders.compute_budget import set_compute_unit_limit, set_compute_unit_price
from bip_utils import Bip44
import asyncio
@andrasbacsai
andrasbacsai / firewall.sh
Last active April 19, 2025 14:31
Update a Hetzner Firewall rule with your IP address
#!/bin/bash
# Script to update a firewall rule in a Hetzner Firewall with your current IP address.
# Good if you would like to restrict SSH access only for your current IP address (secure).
#################
# WARNING: This script will overwrite all rules in the firewall rules, so make sure you
# added all the required rules.
# I use a separate firewall rule just for SSH access.
#################