Skip to content

Instantly share code, notes, and snippets.

View epinna's full-sized avatar

Emilio epinna

View GitHub Profile
@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 / DemoProxy.py
Created November 24, 2012 10:23
Tiny HTTP Proxy
#!/usr/bin/python
__doc__ = """Tiny HTTP Proxy.
This module implements GET, HEAD, POST, PUT and DELETE methods
on BaseHTTPServer, and behaves as an HTTP proxy. The CONNECT
method is also implemented experimentally, but has not been
tested yet.
Any help will be greatly appreciated. SUZUKI Hisao
@epinna
epinna / .gdbinit
Created January 14, 2013 08:54 — forked from apetresc/.gdbinit
#
# STL GDB evaluators/views/utilities - 1.03
#
# The new GDB commands:
# are entirely non instrumental
# do not depend on any "inline"(s) - e.g. size(), [], etc
# are extremely tolerant to debugger settings
#
# This file should be "included" in .gdbinit as following:
# source stl-views.gdb or just paste it into your .gdbinit file
@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, */
@epinna
epinna / popfinder.php
Last active April 7, 2018 16:50
Popfinder is a simple script that helps PHP code analysis of PHP in case of object injection via unserialize function.
<?
/*
popfinder.php - Emilio Pinna 2013
Popfinder is a simple script that can helps code analysis of PHP in case of possible object
injection[1][2] in unserialize function.
#!/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 / pypest.py
Last active September 4, 2023 02:13
Hackish one-liner memory-only backdoor agent which hides from ps
#!/usr/bin/env python
# This script prints a simple one-liner memory-only backdoor agent which hides from ps.
# It renames itself within the process list using a really hackish (AND POTENTIALLY DANGEROUS) /proc/self/mem rewrite
# and spawns a shell on port 9999. Just an experiment, there are simplest way to run unnoticed in the
# process list (see the technique used by EmPyre: https://github.com/adaptivethreat/EmPyre)
template = """
import sys,re,pty,os,socket