Skip to content

Instantly share code, notes, and snippets.

View asuna's full-sized avatar
🏠
Working from home

asuna asuna

🏠
Working from home
View GitHub Profile
@asuna
asuna / kerberos_attacks_cheatsheet.md
Created April 9, 2024 10:38 — forked from TarlogicSecurity/kerberos_attacks_cheatsheet.md
A cheatsheet with commands that can be used to perform kerberos attacks

Kerberos cheatsheet

Bruteforcing

With kerbrute.py:

python kerbrute.py -domain <domain_name> -users <users_file> -passwords <passwords_file> -outputfile <output_file>

With Rubeus version with brute module:

@asuna
asuna / delete-from-v2-docker-registry.md
Created March 18, 2024 15:07 — forked from jaytaylor/delete-from-v2-docker-registry.md
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
@asuna
asuna / README.md
Created March 13, 2024 16:14 — forked from ryu1kn/README.md
Getting GCP access token from a service account key JSON file

Getting GCP access token from a service account key

Use your service account's key JSON file to get an access token to call Google APIs.

Good for seeing how things work, including the creation of JWT token.

To create a JWT token, you can replace create-jwt-token.sh script with tools like step.

If you just want to get an access token for a service account,

#!/bin/bash
# Check_port <address> <port>
check_port() {
if [ "$(which nc)" != "" ]; then
tool=nc
elif [ "$(which curl)" != "" ]; then
tool=curl
elif [ "$(which telnet)" != "" ]; then
tool=telnet
elif [ -e /dev/tcp ]; then
@asuna
asuna / gist:f8a7686edb6df296e56808c668199d62
Last active November 8, 2023 07:51 — forked from clyang/gist:4f3e9f4098469cf53715ed64bede3932
10GB以上的測速檔案 (IPv4及IPv6) - 10GB+ Speedtest file urls (IPv4 & IPv6)
http://download.xs4all.nl/test/10GB.bin
http://ftp.iinet.net.au/test500MB.dat
http://lg-tor.fdcservers.net/10GBtest.zip
http://lg.ams2-c.fdcservers.net/10GBtest.zip
http://lg.chi2-c.fdcservers.net/10GBtest.zip
http://lg.den2-c.fdcservers.net/10GBtest.zip
http://lg.fra2-c.fdcservers.net/10GBtest.zip
http://lg.la2-c.fdcservers.net/10GBtest.zip
http://lg.lon-c.fdcservers.net/10GBtest.zip
http://lg.mad-c.fdcservers.net/10GBtest.zip
import os, json
import requests, time, uuid, hmac, hashlib, base64
import logging
from datetime import datetime
# Setup logging
logFormatter = logging.Formatter('%(asctime)s - %(message)s')
rootLogger = logging.getLogger()
consoleHandler = logging.StreamHandler()
@asuna
asuna / getwvkeys_api.py
Created September 23, 2023 17:41
get wvkeys via getwvkeys.cc
import argparse
import requests
import json
from datetime import datetime
def format_timestamp(timestamp):
if isinstance(timestamp, int):
formatted_time = datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d %H:%M:%S')
return formatted_time
return str(timestamp)
#!/bin/bash
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
while getopts ":i:n:" opt; do
case $opt in
i)
GRE_INTERFACE="$OPTARG"
;;
n)
DOMAIN_NAME="$OPTARG"
@echo off
REM Get the list of GPU devices
for /f "skip=1 tokens=1" %%i in ('nvidia-smi --query-gpu=index --format=csv,noheader,nounits') do (
set GPU_INDEX=%%i
echo Setting GPU !GPU_INDEX! to TCC mode
nvidia-smi --id=!GPU_INDEX! --compute-mode=exclusive_process
)
echo All GPUs have been set to TCC mode
pause
sed '1,2d;s/\([0-9]\+\:[0-9]\+\:[0-9]\+\)\(\.\)/\1,/g'