Skip to content

Instantly share code, notes, and snippets.

View st1vms's full-sized avatar
😎

Stefano Raneri st1vms

😎
View GitHub Profile
@st1vms
st1vms / check_bins.sh
Created April 24, 2024 08:30
GTFOBins checker
#!/usr/bin/bash
bins=(
"7z"
"aa-exec"
"ab"
"agetty"
"alpine"
"ansible-playbook"
"ansible-test"
@st1vms
st1vms / Coursera_WebScraping_Exercise
Last active April 16, 2024 10:21
Coursera_WebScraping_Exercise
.
@st1vms
st1vms / Coursera_DataScience_Exercise
Last active April 16, 2024 09:38
Coursera_Exercise_DataScience
## Where I store my assignments...
@st1vms
st1vms / linear_regr.py
Last active April 6, 2024 11:05
Linear Regression in Python
"""Linear Regression module"""
import numpy as np
class SimpleLinearRegressionModel:
"""Linear regression model class"""
def __init__(self, float_precision: int = 6) -> None:
@st1vms
st1vms / discord_fetch_threads.py
Created February 16, 2024 11:36
Fetch Discord threads data from a specific channel
"""Discord threads crawler module"""
from datetime import datetime
from dataclasses import dataclass
import requests
# Override user agent
USER_AGENT = ""
# Discord Authentication header
@st1vms
st1vms / !Playing MIDI files with Pygame
Created February 5, 2024 16:02
Playing MIDI files with Pygame
Playing MIDI files with Pygame
@st1vms
st1vms / bin_knapsack.py
Last active March 26, 2024 09:48
Knapsack 0-1 solver
"""Binary Knapsack solver"""
from sys import exit as sys_exit
def ask_number(prompt: str) -> int | None:
"""Asks an integer number repeatedly"""
while True:
try:
return int(input(prompt).strip())
@st1vms
st1vms / protonvpn_rater.py
Last active November 6, 2023 14:09
Python script to rate ProtonVPN FreeTier domains by load factor.
"""Auto retrieve ProtonVPN free-tiers load ratings"""
from requests import get as http_get
# Taken from https://account.protonvpn.com/downloads
# Open dev-tools and look for GET requests to /api/vpn/logicals endpoint
# Copy the entire cookie header value into this string
__COOKIE_STRING = ""
# Also copy the x-pm-uid header value from that same GET request into this string
__X_PM_UID_STRING = ""
@st1vms
st1vms / admin_uac_prompt.bat
Created October 31, 2023 12:49
Powershell/.bat utils
@echo off
set command=timeout /t 30
powershell.exe -Command "Start-Process -Wait cmd -Verb RunAs -ArgumentList '/C %command%'"
pause
@st1vms
st1vms / GitAPI Wrappers
Last active February 4, 2024 18:27
Git API utility wrappers
Collections of Git API utility wrappers made in Python