Skip to content

Instantly share code, notes, and snippets.

View barryirwin's full-sized avatar

Barry Irwin barryirwin

View GitHub Profile
@dloss
dloss / gist:5693316
Created June 2, 2013 11:06
Analysing network traffic with Pandas
{
"metadata": {
"name": "pcap"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@dotysan
dotysan / spamhaus2quagga.sh
Last active June 17, 2020 05:52
Run as hourly cronjob to sync the Spamhaus DROP/EDROP lists into quagga.
#! /bin/bash -e
#
# maintain spamhaus blacklists as quagga prefix filters
#
cd ~/net
wget -nv -N http://www.spamhaus.org/drop/{,e}drop.txt
re1='^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/[0-9]+) '
re2='^([-+])([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/[0-9]+)$'
@MaxLaumeister
MaxLaumeister / Grub_Powerup.md
Last active June 7, 2024 15:58
Grub Init Tune: Mario Bros. Mushroom Powerup

Grub Init Tune - Mario Bros. Mushroom Powerup

This Grub Init Tune will make your computer sound like a Super Mushroom every time you turn it on! This only works for the Grub bootloader - this generally means you need to have Linux (or other Grub-based OS) installed.

Here's the code, which goes in your /etc/default/grub file:

GRUB_INIT_TUNE="1750 523 1 392 1 523 1 659 1 784 1 1047 1 784 1 415 1 523 1 622 1 831 1 622 1 831 1 1046 1 1244 1 1661 1 1244 1 466 1 587 1 698 1 932 1 1195 1 1397 1 1865 1 1397 1"

Installation Instructions

@amwelch
amwelch / discover.py
Created March 19, 2016 09:05
iftop like report from a pcap
import dpkt
import humanfriendly
import nids
import pandas as pd
import socket
import sys
conv = {}
ip_to_domain = {}
end_states = (nids.NIDS_CLOSE, nids.NIDS_TIMEOUT, nids.NIDS_RESET)
@nbrownus
nbrownus / edgemax-snmp.txt
Created October 12, 2016 01:37
Interesting snmp stats from a ubiquiti edgemax
# This is not an inclusive list, there were things I left that, things I totally don't care about or don't know I care about
# snmpwalk -OT -v 2c -c "public" <your routers private ip>
# snmpwalk -OT -v 2c -c "public" <your routers private ip> 1.3
# system
HOST-RESOURCES-MIB::hrSystemProcesses.0 = Gauge32: 32
HOST-RESOURCES-MIB::hrSystemNumUsers.0 = Gauge32: 0
# memory info
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 495532 kB
#!/usr/bin/env python
__author__ = "m.busche@gmail.com"
# This program lets your blink1 device blink whenever Pi-hole has filtered ads
# Have fun.
# blink1 commandline tool: https://github.com/todbot/blink1/blob/master/docs/blink1-tool.md
# Pi-hole https://github.com/pi-hole/pi-hole
# To start this as a service I would recommend using supervisord
@staaldraad
staaldraad / ioctlfilter.c
Created March 21, 2017 13:56
Filters keycodes from R400 presenter in Linux
/* Grabs all input from Logitech R400 presenter and filters to ensure only certain keys are pressed.
* Ensures that only valid R400 keys are pressed and not rogue keys injected.
* Main logic for this found here: http://stackoverflow.com/questions/7668872/need-to-intercept-hid-keyboard-events-and-then-block-them
* Author: Etienne Stalmans <etienne@sensepost.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@deibit
deibit / visual_cryptography_py3.py
Created December 3, 2018 10:21
Visual Cryptography (Python3)
# Copyright, Robert Donovan, LessonStudio, 2014
# If you use this then tweet what you did with it @LessonStudio.
# This file takes one argument which is a file that you would like to split into two encrypted images.
# The original image can only be viewed by overlaying the two encrypted images.
# If printed on clear plastic, It can be very finicky to align the two images if the pixel count is too high.
# For best results keep the original image below 200x200 pixels and print as large as possible onto clear plastic to
# obtain the best results.
# You can go to higher resolutions but you then really have to be precise when aligning the two images.
@Viss
Viss / gist:e7c735ed389c8d055e6f31e845f25516
Created April 18, 2019 00:16
bash one liner for extracting shodan results for weblogic.
#!/bin/bash
# this script was written by viss as a challenge from @random_robbie
# This one-liner replaces a fairly lengthy python script
# if you want to be walked through it, sign up for square cash, send $viss 20 dollars. Otherwise, flex your google fu!
# oh, ps: you need to pip install shodan, and then configure the shodan cli client by giving it your api key.
# then you're off to the races.
shodan search --fields ip_str --limit 1000 'product:"Oracle Weblogic" port:"7001" country:"US"' | sort -u | nmap -sT -Pn -n -oG - -iL - -p 7001 | grep open | awk '{print $2}' | xargs -I % -n 1 -P 30 bash -c 'RESULT=`curl -s -I -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko0100101 Firefox/54.0" -H "Connection":"close" -H "Accept-Language":"en-US -H en;q=0.5" -H "Accept":"text/html -H application/xhtml+xml -H application/xml;q=0.9 -H */*;q=0.8" -H "Upgrade-Insecure-Requests":"1" %:7001/ws_utc/config.do | egrep HTTP`; echo "%: $RESULT";'