Skip to content

Instantly share code, notes, and snippets.

@whit3rabbit
whit3rabbit / old_python_kali.py
Created March 21, 2025 17:21
Install older python versions in kali
# It's not recommended to install other repos unless you have to
#
sudo apt-get update
sudo apt install python3-launchpadlib software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo sed -i 's|deb https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu/ kali-rolling main|deb https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu/ noble main|' /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-kali-rolling.list
sudo apt-get update
sudo apt install python3.10 python3.10-venv
@whit3rabbit
whit3rabbit / find_token.c
Last active September 11, 2024 20:01
Find token
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <psapi.h>
#pragma comment(lib, "psapi.lib")
#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
#define STATUS_INFO_LENGTH_MISMATCH 0xC0000004
typedef LONG NTSTATUS;
@whit3rabbit
whit3rabbit / hide_process_name.c
Last active October 4, 2024 16:25
hide_process_name.c
#define _GNU_SOURCE
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/prctl.h>
#include <sys/mman.h>
#include <errno.h>
#include <dirent.h>
#include <sys/mount.h>
#include <sys/stat.h>
# !pip install torch transformers scikit-learn umap-learn matplotlib datasets joblib pandas zstandard
'''
Code outline:
1. Loading the pre-trained GPT-2 model and tokenizer.
2. Loading or downloading the dataset and saving it to disk with compression.
3. Collecting and normalizing activations from the middle layer of the model.
4. Training multiple SAEs with different feature sizes and saving them to disk.
5. Finding the feature that responds to the phrase "Golden Gate Bridge" in each SAE.
@whit3rabbit
whit3rabbit / lightgbmgpu.sh
Created November 24, 2023 19:57
google colab lightgbm with gpu install
! sudo apt install python3.10-venv
! pip uninstall -y lightgbm && rm -rf LightGBM && git clone --recursive https://github.com/Microsoft/LightGBM && cd LightGBM && sh build-python.sh install --gpu
! mkdir -p /etc/OpenCL/vendors && echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
@whit3rabbit
whit3rabbit / duplicate.ps1
Created March 20, 2023 00:38
remove duplicates files from current directoy
# Function to display a menu and get the user's choice
function Show-Menu {
param (
[string]$Title = "Menu",
[string[]]$MenuItems
)
Clear-Host
# Display the title
@whit3rabbit
whit3rabbit / client.go
Created January 22, 2023 20:02
port knocker by chatgpt
// Client
package main
import (
"fmt"
"net"
"time"
)
func main() {
@whit3rabbit
whit3rabbit / csv
Created October 5, 2022 00:27
user-agents
This file has been truncated, but you can view the full file.
useragent_string,browser_family,browser_version,operating_system,operating_system_version,device_family,is_mobile,is_tablet,is_touch_capable,is_pc,is_bot,overview
"Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)",Other,,Other,,Other,False,False,False,False,False,Other / Other / Other
"Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)",Other,,Other,,Other,False,False,False,False,False,Other / Other / Other
Mozilla/5.0 (compatible; ABrowse 0.4; Syllable),Other,,Other,,Other,False,False,False,False,False,Other / Other / Other
Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Acoo Browser 1.98.744; .NET CLR 3.5.30729),IE,8.0,Windows,Vista,Other,False,False,False,True,False,PC / Windows Vista / IE 8.0
Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Acoo Browser 1.98.744; .NET CLR 3.5.30729),IE,8.0,Windows,Vista,Other,False,False,False,True,False,PC / Windows Vista / IE 8.0
Mozilla/4.0 (compatible; MSIE 8.
@whit3rabbit
whit3rabbit / pcap-swarm.sh
Last active May 6, 2022 16:25
Docker Swarm Packet Capture
#!/bin/bash
echo "[+] Getting docker swarm ingress network ID"
INGRESS=`sudo docker network ls | grep ingress | cut -b -10`
echo "[+] Ingress: $INGRESS"
echo "[+] Running netshoot container with tcpdump"
read -p "[?] Filename for packet capture: " OUTPUT_FILE
Had some issues installing spacy on windows. These were the steps that worked for me.
# Install cuda toolkit SDK 11.0
# https://developer.nvidia.com/cuda-11.0-download-archive
############################
# INSIDE ANACONDA TERMINAL #
############################
# Create virtual env for spacy