- Sorting by month and day:
- Sorting IP Addresses
sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4
- https://www.madboa.com/geek/sort-addr/
- Uniq only counts the instances that are close to each other, so sort first:
cat | sort | uniq -c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set ai | |
set expandtab | |
set shiftwidth=4 | |
set tabstop=4 | |
colorscheme elflord | |
syntax enable | |
set showmatch | |
set mat=2 | |
set ignorecase | |
set history=300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
A pure Python "ping" implementation, based on a rewrite by Johannes Meyer, | |
of a script originally by Matthew Dixon Cowles. Which in turn was derived | |
from "ping.c", distributed in Linux's netkit. The version this was forked | |
out of can be found here: https://gist.github.com/pklaus/856268 | |
The versions this script derived from are licensed under GPL v2, this makes | |
mandatory that this is licensed under the same terms as well. If it were up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################ | |
# setup_wpe.sh | |
# Author: Don C. Weber (@cutaway) | |
# Purpose: Setup interfaces for hostapd-wpe. This will enable dnsmesq so that the interfaces are ready to serve up an Internet | |
# connection for any clients that maintain a connection to the system. Additional configuration of dnsmasq and | |
# hostapd-wpe required. | |
# | |
################ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# hostapd-wpe.conf | |
# Brad Antoniewicz (@brad_anton) - Foundstone | |
# ------------------------------------------------ | |
# Updated to provide additional WPA2 configuration control | |
# Don C. Weber (@cutaway) - InGuardians, Inc. | |
# ------------------------------------------------ | |
# | |
# Configuration file for hostapd-wpe | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
########################################################################### | |
# ics_startup.sh - This shell script is designed to help setup Internet | |
# sharing between to interfaces. It will generate | |
# the appropriate iptable rules, implement them, | |
# and start the DHCP server. It will also reset | |
# the system. | |
# | |
# Copyright (c) 2012, InGuardians, Inc. <consulting@inguardians.com> | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
from pyparsing import Word, alphas, Suppress, Combine, nums, string, Optional, Regex | |
#from time import strftime | |
import time | |
from datetime import datetime | |
# Script: ssh_accepted_xlog_parser.py | |
# Author: Don C. Weber (cutaway) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os,sys | |
from ipwhois import IPWhois | |
import socket | |
import warnings | |
# Supress warnings | |
warnings.filterwarnings('ignore') | |
# Set field names | |
f = ['asn','asn_cidr','nets','query','asn_description'] |
OlderNewer