Skip to content

Instantly share code, notes, and snippets.

View ander94lakx's full-sized avatar
💻
Hacking stuff

Ander ander94lakx

💻
Hacking stuff
View GitHub Profile
@ander94lakx
ander94lakx / ApiClient.cs
Created May 6, 2020 09:38
Modified version of CallApi() Method from swagger-codegen generated C# client that allows using Cookie headers
/// <summary>
/// Makes the HTTP request (Sync).
/// </summary>
/// <param name="path">URL path.</param>
/// <param name="method">HTTP method.</param>
/// <param name="queryParams">Query parameters.</param>
/// <param name="postBody">HTTP body (POST request).</param>
/// <param name="headerParams">Header parameters.</param>
/// <param name="formParams">Form parameters.</param>
/// <param name="fileParams">File parameters.</param>
@ander94lakx
ander94lakx / yara_linux_install.sh
Last active May 3, 2023 00:39
YARA install script for linux systems (with crypto support
# Download YARA (Modify if a different version is needed)
wget https://github.com/VirusTotal/yara/archive/refs/tags/v4.1.2.tar.gz
tar -zxf yara-4.1.2.tar.gz
cd yara-4.1.2
./bootstrap.sh
# Prerequisites
sudo apt install automake libtool make gcc pkg-config libssl-dev
# Build with make
@ander94lakx
ander94lakx / ssdeep_nist_nsrl_lookup.sh
Created August 24, 2021 15:23
Given a file, looks for similar files in NSRL (NIST) using ssdeep datasets
#!/bin/bash
absdir=$(realpath "$1")
echo $absdir
mkdir NSRL_Corp
cd NSRL_Corp
rm *.zip
rm *.ssd
curl https://s3.amazonaws.com/docs.nsrl.nist.gov/morealgs/ssdeep_2.10/NSRL_corp.0[0-1][0-9].0.zip -o "NSRL_corp.0#1#2.0.zip"
curl https://s3.amazonaws.com/docs.nsrl.nist.gov/morealgs/ssdeep_2.10/NSRL_corp.0[0-1][0-9].5.zip -o "NSRL_corp.0#1#2.5.zip"
@ander94lakx
ander94lakx / spotify_top_songs_and_artists.py
Last active February 13, 2022 13:48
Takes Spotify JSON history and gives the top X listened songs and artists
"""Spotify Top X Artists and Songs
This script takes data from StreamingHistory[x].json files exported from Spotify
and gives the most listened songs and artists based on that data
Args:
top (int): The length of the most listened artists and songs
(default is 10)
"""
@ander94lakx
ander94lakx / 3xplus1.py
Created February 13, 2022 13:52
Transform your computer into a radiator with this problem that our friend Collatz left us. Useful for nothing except for stress tests
from functools import cache, lru_cache
from pynput import keyboard
import time
stop = False
def on_press(key):
global stop
print(key)
if key == keyboard.Key.esc: