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 / 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>
@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 / 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 / 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 / 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 / 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 (
FROM debian:buster-slim
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
COPY ./target/release/rust_app .
RUN chmod +x rust_app
<input type="file" id="imgUpload"><canvas id="imgCanvas" style="display:none;"></canvas><input type="number" id="r" max="255" min="0" placeholder="R" value="255"><input type="number" id="g" max="255" min="0" placeholder="G" value="255"><input type="number" id="b" max="255" min="0" placeholder="B" value="255"><div id="colorPreview" style="width:50px;height:50px;background-color:rgb(255,255,255);"></div><a id="downloadLink" style="display:none;" download="processed_image.png">Download Image</a><script>document.getElementById('imgUpload').addEventListener('change',function(e){const t=document.getElementById('imgCanvas'),n=t.getContext('2d'),o=new FileReader;o.onload=function(e){const a=new Image;a.onload=function(){t.width=a.width,t.height=a.height,n.drawImage(a,0,0),updateImage()},a.src=e.target.result},o.readAsDataURL(e.target.files[0])});function updateImage(){const t=document.getElementById('imgCanvas'),n=t.getContext('2d'),r=parseInt(document.getElementById('r').value)||0,g=parseInt(document.getElementById(
@STashakkori
STashakkori / gist:2075999954abd44e8ebbbf0b439dd6f1
Created October 7, 2023 04:25
Poor human's hexdump in ps. Works but stupid slow
$filePath = "D:\test_binary.exe"
$bytes = [System.IO.File]::ReadAllBytes($filePath)
$hexLines = @()
$asciiLines = @()
for ($i = 0; $i -lt $bytes.Length; $i += 8) {
$lineBytes = $bytes[$i..($i + 7)]
$hexLine = -join ($lineBytes | ForEach-Object { " {0:x2}" -f $_ })
$asciiLine = [System.Text.Encoding]::ASCII.GetString($lineBytes)
use kube::{
api::{Api, ListParams, ResourceExt},
Client, Config, error::Error,
};
use tokio::sync::watch;
struct SalvumPod {
}