Skip to content

Instantly share code, notes, and snippets.

View STashakkori's full-sized avatar
🖖
Hello and welcome

$t@$h STashakkori

🖖
Hello and welcome
View GitHub Profile
@STashakkori
STashakkori / dump_reg.bat
Last active June 15, 2025 23:41
Dump registry
@echo off
setlocal
set "RegBackupFile=C:\Users\user\Documents\csd_data\bkp.reg"
> "%RegBackupFile%" (
echo Windows Registry Editor Version 5.00
echo.
)
for %%a in (HKLM HKCU HKCR HKU HKCC) do (
@STashakkori
STashakkori / linux_trainer.sh
Created June 15, 2025 23:42
Linux multi-distro training script
#!/bin/bash
hshu="867d90e6f81e9bf68a7f1690e451fa4e96df8944140d4a3b671216eac4cd4975"
hshp="26a1600d38754149cc9cebdae6826dd4740a9dcb2aa4cb5f7cd09bde42abbab4"
print_with_delay() {
local text="$1"
local delay=0.04
for (( i=0; i<${#text}; i++ )); do
@STashakkori
STashakkori / ossl_example.lua
Created June 16, 2025 02:22
Generate SSL token in Lua
-- Includes
local openssl = require('openssl')
local uuid = require('openssl.rand').bytes
-- Function to generate a UUID
local function generateUUID()
local randomBytes = uuid(16) -- 16 bytes of random data
local template = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
local d = {}
for i = 1, #randomBytes do
@STashakkori
STashakkori / enforce_group.lua
Created June 16, 2025 02:27
How to enforce group in lmod lua
-- Function to check if a user is in a given group
-- Hardcoded to allow group root. Can also add sudo
-- if needed and any other group to always allow
local function enforce_group(group)
local user = subprocess("whoami")
local command = "id -nG " .. user
local result = subprocess(command)
if result:find("root") then return end
if not result:find(group) then
LmodError("Access to this module is denied.")
@STashakkori
STashakkori / solution.py
Created June 19, 2025 15:00
DataAnnotations Challenge Solution
# Working solution. Hope it helps someone
# $t@$h
import requests
from bs4 import BeautifulSoup
def decode_secret_message(doc_url):
# Get doc content
response = requests.get(doc_url)
html = response.text
soup = BeautifulSoup(html, 'html.parser')
@STashakkori
STashakkori / Show IP address
Created June 27, 2025 14:46
Simple display IP despite CSP or WAF
<div style="height: 30px; display: flex; align-items: center; justify-content: center; margin-top: 0; padding: 0; margin-bottom: 0; border: none; overflow: hidden; background: #404040;">
<iframe
src="https://api.ipify.org"
scrolling="no"
style="border: none; height: 30px; width: 120px; overflow: hidden;">
</iframe>
</div>