Skip to content

Instantly share code, notes, and snippets.

View ffr4nz's full-sized avatar
☠️
Doing stuff...

@ffranz ffr4nz

☠️
Doing stuff...
View GitHub Profile
@ffr4nz
ffr4nz / parsetormap.py
Created May 24, 2013 10:59
Python script to detect TOR IPs in access_log files, geolocate detected IPs and build a .KML map to be viewed on Google Maps.
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Based on parsetor.py script to detect TOR IPs in access_log files
# www.securitybydefault.com
#
# Based on hello_world_5_globe_scale.py
# http://code.google.com/p/pykml/source/browse/src/examples/misc/hello_world/hello_world_5_globe_scale.py
#
@ffr4nz
ffr4nz / martianIPs.py
Created May 24, 2013 11:04
List all Martian IPs, included the current broadcast address.
#!/usr/bin/env python
from commands import *
import iptools
#Get broadcast IP (must choose the correct interface)
com="ifconfig eth0 | grep 'inet '| grep -v '127.0.0.1' | cut -d: -f3 | awk '{ print $1}'"
Bcast = getoutput(com)
#Declare IPTools objects
SRC_MARTIAN_IPS = iptools.IpRangeList(
@ffr4nz
ffr4nz / scapy-getmulticastmac.py
Created May 24, 2013 11:10
provides a MAC address from the multicast MAC created by IANA. With a total of 66 111 possible MACs, the MAC can be random if the parameter is omitted or is zero. Also, you can obtain a MAC by index within the range 1-66111. Used over scapy-2.1.0.
multicastList = ["01:00:5E:00:00:00","01:00:5E:7F:FF:FF","01:00:5E:80:00:00",
"01:00:5E:8F:FF:FF","01:00:5E:90:00:00","01:00:5E:FF:FF:FF","01:80:C2:00:00:00",
"09:00:02:04:00:01","09:00:02:04:00:02","09:00:09:00:00:01","09:00:09:00:00:01",
"09:00:09:00:00:04","09:00:1E:00:00:00","09:00:2B:00:00:00","09:00:2B:00:00:01",
"09:00:2B:00:00:02","09:00:2B:00:00:03","09:00:2B:00:00:04","09:00:2B:00:00:05",
"09:00:2B:00:00:06","09:00:2B:00:00:07","09:00:2B:00:00:0F","09:00:2B:00:00:10",
"09:00:2B:00:00:11","09:00:2B:00:00:12","09:00:2B:00:00:13","09:00:2B:00:00:14",
"09:00:2B:00:00:15","09:00:2B:00:00:16","09:00:2B:00:00:17","09:00:2B:00:00:18",
"09:00:2B:00:00:19","09:00:2B:00:00:1A","09:00:2B:00:00:1B","09:00:2B:00:00:1C",
"09:00:2B:00:00:1D","09:00:2B:00:00:1E","09:00:2B:00:00:1F","09:00:2B:01:00:00",
@ffr4nz
ffr4nz / RandUserAgentString.py
Last active December 18, 2015 21:19
User Agent list
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2011 Francisco J. Gomez (aka) @ffranz
# All rights reserved.
import urllib
import re
import sys
import os
@ffr4nz
ffr4nz / blinking.sh
Last active December 22, 2015 16:19
Remind yourself that you have to blink
while :
do
x=`osascript -e 'tell app "System Events" to display dialog "Time to BLINK!" default button 1 buttons {"Done"} with title "Blink alert" with icon 2'`
sleep 90
done
@ffr4nz
ffr4nz / tears.sh
Created September 9, 2013 17:05
Remind yourself that you have to use artificial tears
while :
do
x=`osascript -e 'tell app "System Events" to display dialog "Your eye need some tears!" default button 1 buttons {"Done"} with title "Tear alert" with icon 0'`
sleep 900
done
#!/usr/bin/python
# -*- coding: utf-8 -*-
import unirest
import time
import urllib2
import json
SCREEN_NAME = "ffranz"
@ffr4nz
ffr4nz / gtp.py
Last active November 28, 2017 07:09
Scapy GTP Layer
#! /usr/bin/env python
## Copyright (C) 2014 Guillaume Valadon <guillaume.valadon@ssi.gouv.fr>
## 2014 Alexis Sultan <alexis.sultan@sfr.com>
## 2012 ffranz <ffranz@iniqua.com>
##
## This program is published under a GPLv2 license
# scapy.contrib.description = GTP
# scapy.contrib.status = loads
/*
The MIT License (MIT)
Copyright (c) 2014 sinfonier-project
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
/*
The MIT License (MIT)
Copyright (c) 2014 sinfonier-project
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is