Skip to content

Instantly share code, notes, and snippets.

View BitesizedLion's full-sized avatar
🔌
Nothing

Casper BitesizedLion

🔌
Nothing
View GitHub Profile
@BitesizedLion
BitesizedLion / conv.py
Last active July 5, 2024 16:44
Bulk ACRCloud fingerprint generation, configured for videos but can replace with audio.
import os
import subprocess
from concurrent.futures import ThreadPoolExecutor
directory_path = './'
acrcloud_path = '/tmp/tmp.KINBD0Xo6M/acrcloud'
output_base_path = './'
video_extensions = ['.mkv', '.mp4']
let lines = input.split('\n').filter(line => line.trim() !== '');
let longestLine = '';
let maxLength = 0;
for (let line of lines) {
if (line.length > maxLength) {
maxLength = line.length;
longestLine = line;
}
@BitesizedLion
BitesizedLion / block_cyberok.sh
Last active June 4, 2024 05:36
CYBEROK Skipa scanner IPs.
iptables -A INPUT -s 31.131.251.106 -j DROP -m comment --comment "cyberok scanner"
iptables -A INPUT -s 37.9.13.84 -j DROP -m comment --comment "cyberok scanner"
iptables -A INPUT -s 45.146.167.56 -j DROP -m comment --comment "cyberok scanner"
iptables -A INPUT -s 45.92.176.129 -j DROP -m comment --comment "cyberok scanner"
iptables -A INPUT -s 45.92.176.143 -j DROP -m comment --comment "cyberok scanner"
iptables -A INPUT -s 45.92.176.144 -j DROP -m comment --comment "cyberok scanner"
iptables -A INPUT -s 45.92.176.94 -j DROP -m comment --comment "cyberok scanner"
iptables -A INPUT -s 45.92.177.113 -j DROP -m comment --comment "cyberok scanner"
iptables -A INPUT -s 62.84.116.13 -j DROP -m comment --comment "cyberok scanner"
iptables -A INPUT -s 77.223.102.191 -j DROP -m comment --comment "cyberok scanner"
@BitesizedLion
BitesizedLion / poc.md
Last active April 18, 2024 16:57
spotify playlist fetch poc

This is how you do that if you have an URL like this https://open.spotify.com/playlist/04ZwFco4KsjgPlVMtzwfgS:

curl --request GET \
  --url 'https://api-partner.spotify.com/pathfinder/v1/query?operationName=fetchPlaylistMetadata&variables=%7B%22uri%22%3A%22spotify%3Aplaylist%3A04ZwFco4KsjgPlVMtzwfgS%22%2C%22offset%22%3A0%2C%22limit%22%3A3600%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%2291d4c2bc3e0cd1bc672281c4f1f59f43ff55ba726ca04a45810d99bd091f3f0e%22%7D%7D' \
  --header 'accept: application/json' \
  --header 'authorization: Bearer BQC5nawapxAyWAuEwkypD2TdMLN3YNVWgtWypxznadORLWsBQg6zG0FvJ1O1W7ZgtprCqqPQZG1LkHubRfkDiAl2zbzu8KDJkGT-zFSQHH6vT4-Alv4' \
  --header 'content-type: application/json;charset=UTF-8' \
  --header 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'
#!/bin/bash
#
#
# HetrixTools Server Monitoring Agent - Install Script
# Copyright 2015 - 2023 @ HetrixTools
# For support, please open a ticket on our website https://hetrixtools.com
#
#
# DISCLAIMER OF WARRANTY
#
PostUp = ip route add default via T.H.I.S.I.S.M.Y.G.A.T.E.W.A.Y dev ens18 table ports
PostUp = ip rule add fwmark 0x2 table ports
PostUp = /sbin/iptables -A OUTPUT -t mangle -o cyberghost -p tcp --sport 22 -j MARK --set-mark 2
PostUp = /sbin/iptables -A OUTPUT -t mangle -o cyberghost -p tcp --sport 80 -j MARK --set-mark 2
PostUp = /sbin/iptables -A OUTPUT -t mangle -o cyberghost -p tcp --sport 443 -j MARK --set-mark 2
PostUp = /sbin/iptables -A OUTPUT -t mangle -o cyberghost -p tcp --sport 32400 -j MARK --set-mark 2
PostUp = /sbin/iptables -A OUTPUT -t mangle -o cyberghost -p tcp --sport 16556 -j MARK --set-mark 2
PreDown = /sbin/iptables -D OUTPUT -t mangle -o cyberghost -p tcp --sport 22 -j MARK --set-mark 2
PreDown = /sbin/iptables -D OUTPUT -t mangle -o cyberghost -p tcp --sport 80 -j MARK --set-mark 2
PreDown = /sbin/iptables -D OUTPUT -t mangle -o cyberghost -p tcp --sport 443 -j MARK --set-mark 2
@BitesizedLion
BitesizedLion / skipdj.js
Created February 26, 2024 15:07
Simple snippet for skipping Spotify DJ
Spicetify.Player.addEventListener("songchange", (event) => {
if (Spicetify.Player.data.item.provider == "narration/intro") Spicetify.Player.next();
});
@BitesizedLion
BitesizedLion / config.conf
Created November 28, 2023 16:08
neofetch config
# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
print_info() {
info title
info underline
info "OS" distro
info "Host" model
info "Kernel" kernel
info "Uptime" uptime
@BitesizedLion
BitesizedLion / gist:3faf5ca66044a36f35dedc417a6bf566
Created August 28, 2023 21:53
flip sound@cinnamon.org (artist, track -> track, artist)
this.trackInfo.add_actor(artistInfo);
this.trackInfo.add_actor(titleInfo);
^^ flip to
this.trackInfo.add_actor(titleInfo);
this.trackInfo.add_actor(artistInfo);