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
<?php | |
// https://3v4l.org/XsSjl | |
function base64url_encode($data) { | |
return rtrim(strtr(base64_encode($data), '+/', '-_'), '='); | |
} | |
$str=""; | |
for($i=1;$i<30;++$i){ | |
$str.=chr($i); | |
$encoded_base = base64url_encode($str); |
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
FROM ubuntu:20.04 | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update -y | |
RUN apt-get -y full-upgrade; | |
RUN apt-get -y install apt-utils | |
RUN apt-get -y install default-mysql-server libmysqlclient-dev git make autoconf gcc re2c wget xz-utils tar file bison | |
RUN git clone -b 'PHP-7.3' --depth 1 https://github.com/php/php-src.git php56 | |
# https://askubuntu.com/questions/1329414/why-is-my-global-h-from-libmysqlclient-dev-is-missing-in-ubuntu-20-04 | |
#RUN touch /usr/include/mysql/my_global.h | |
#RUN apt-get install -y bison |
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
<?php | |
declare(strict_types=1); | |
function dd($var) | |
{ | |
var_dump($var); | |
die; | |
} |
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
<?php | |
declare(strict_types=1); | |
use function var_dump as d; | |
$files = shell_exec("find . -name '*.php' -print0"); | |
$files = explode("\x00", rtrim($files, "\x00")); | |
foreach ($files as $file) { | |
echo "Checking {$file}..."; |
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
# winpip install var_dump pyautogui pywin32 pymem pillow pyscreeze | |
import base64 | |
import os | |
import pyautogui as pyautogui | |
from pymem import Pymem | |
from var_dump import var_dump | |
import time | |
import math | |
from random import randrange | |
import ctypes |
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/env php | |
<?php | |
declare (strict_types = 1); | |
global $argc, $argv; | |
if ($argc < 3) { | |
echo ("Usage: {$argv[0]} 'FOLDER' rsync FOLDER foo@bar:server_folder arg1 arg2 arg3 etc\n"); | |
exit(1); | |
} | |
/** |
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
<?php | |
declare(strict_types=1); | |
init(); | |
function record():array{ | |
$autoit=new AutoIt(); | |
$stdin=fopen("php://stdin","rb"); | |
stream_set_blocking($stdin,false); | |
$image_binaries=[]; | |
$filename="recorded".bin2hex(random_bytes(4)).".png"; |
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
php -r 'ini_set("memory_limit","-1");$a=[];for($i=0;;++$i){echo "leaked {$i}MB\r";$a[]=random_bytes(1*1024*1024);}'; |
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
screen -S emergency_diskspace -dm | |
sleep 1 # workaround https://savannah.gnu.org/bugs/?54164 | |
screen -S emergency_diskspace -X stuff ' | |
mkdir /emergency_diskspace; | |
cd /emergency_diskspace; | |
for i in {0..9} | |
do | |
echo creating 10gb_\$i | |
dd if=/dev/urandom of=10gb_\$i bs=10M count=1000 iflag=fullblock status=progress; | |
done |
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
// ==UserScript== | |
// @name Bitbucket ignore pull request - bitbucket.org | |
// @namespace divinity76 | |
// @include /^https\:\/\/bitbucket\.org\// | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @description screenshot: https://user-images.githubusercontent.com/1874996/175759481-27eb41c5-6874-44f1-a428-d195a7bcbab8.png - 6/26/2022, 1:10:55 AM | |
// ==/UserScript== |