Skip to content

Instantly share code, notes, and snippets.

View st1vms's full-sized avatar
😎

Stefano Raneri st1vms

😎
View GitHub Profile
@st1vms
st1vms / GitAPI Wrappers
Last active February 4, 2024 18:27
Git API utility wrappers
Collections of Git API utility wrappers made in Python
@st1vms
st1vms / elevenlabs_auto_key.py
Last active December 3, 2023 17:18
Semi-Automatic ElevenLabs scraper to auto gather API keys.
#!/usr/bin/env python3
"""ElevenLabs Scraper module"""
# REQUIRES: pip install -U selgym onesecmail_api
# RUN with: python elevenlabs_auto_key.py
from re import findall
from time import sleep
from random import choice
from string import ascii_lowercase, ascii_uppercase, digits
from screeninfo import get_monitors
@st1vms
st1vms / ping_net.py
Last active August 5, 2024 12:19
Network device discovery tool using ICMP (ping) requests.
#!/usr/bin/env python3
# requirements -> pip install ping3
import re
import multiprocessing
from multiprocessing import Lock, cpu_count, Manager
from ping3 import ping
__DEFAULT_NET_ADDR_PART = "192.168.1"
__N_PROCESSES = cpu_count() - 1
__GLOBAL_LOCK = Lock()
@st1vms
st1vms / discord_text_emojis.py
Created September 17, 2023 15:45
Auto send/delete emoji-reactions from text, for Discord messages.
import requests
from urllib import parse
from time import sleep
from emoji_table import EMOJI_TABLE
__AUTHTOKEN = "Authentication header value provided by discord, retrievable using browser dev-tools"
__COOKIE = "Cookie header value provided by discord, retrievable using browser dev-tools"
__USER_AGENT = (
@st1vms
st1vms / discord_auto_nick.py
Last active September 21, 2023 14:34
Auto change your Discord nickname
import requests
import json
# The Guild ID string to use when changing the nickname
guild_id = "000000000000000000"
# Discord session cookie string
cookie = "Entire Cookie header value when visiting discord, using browser devtools."
# Authorization header value
@st1vms
st1vms / rsa_utils.py
Last active September 4, 2024 12:18
RSA utilities for generating Pub,Prv keys and encrypting/decrypting messages...
"""RSA Utilities"""
import random
import math
from dataclasses import dataclass
@dataclass(frozen=True)
class PubKey:
"""Public Key dataclass"""
e: int # Public exponent
n: int # Modulus
@st1vms
st1vms / sieve_atkin.py
Last active September 9, 2023 12:57 — forked from mineta/marinamele_sieve_atkin.py
Python code implementing Sieve of Atkin algorithm for getting list of primes up to limit.
import math
def atkin(nmax:int) -> list[int]:
"""
Returns a list of prime numbers below the number `nmax`
"""
is_prime = dict([(i, False) for i in range(5, nmax+1)])
for x in range(1, int(math.sqrt(nmax))+1):
for y in range(1, int(math.sqrt(nmax))+1):
n = 4*x**2 + y**2
@st1vms
st1vms / !tools
Last active February 7, 2024 16:29
ScriptingTools
Collection of scripting tools for linux and python