Skip to content

Instantly share code, notes, and snippets.

View brickzva's full-sized avatar

Bruce Maurer brickzva

  • Northern Virginia
View GitHub Profile
@brickzva
brickzva / resolve2active.py
Created December 19, 2015 19:41
DNS reverse look up on a seed file of IP's and check for reach-ability.
!/usr/bin/python
import os
import socket
with open('loggers.txt') as f:
a = [a.strip('\n') for a in f.readlines()]
print('\n' + 'Unknown destination addresses seen and need to be resolved!')
for name in a:
print('original IP -> ' + name)
@brickzva
brickzva / latency_finder.sh
Last active November 23, 2017 05:11
Quick Bash tool to test for bottlenecks on an internal network. Tests the path to a host with each UDP/ICMP/TCP packet types for comparison. Used from shell and target device passed from stdin: example "./latency_finder.sh <<your host here>>" Can be used in cron job for scheduled testing.
#!/bin/bash
host=$1
echo "------"
echo "MTR Trace Report - UDP"
echo "______________________"
mtr -r -w -c 10 --show-ips -u $host
echo "------"
@brickzva
brickzva / updated.sh
Created July 2, 2016 17:26
Simple apt update, upgrade and autoclean routine for the lazy folks like me.
#!/bin/bash
##
## Insanely simiple way to run updates if you don't have automatic updates enabled
##
## 1. copy this to a file on to your favorite host \
## 2. chmod +x ./<yourfile_name> (makes the script executable)
## 3. run your new script by "./<yourfile_name>
## 4. you'll be prompted for you password (sudo), then off to the races..
##
echo "Time to update!"
@brickzva
brickzva / CdpNeighborList.py
Created December 18, 2017 06:21
Cisco CDP Neighbors Using "easysnmp" library and Python3
from easysnmp import Session
'''
EasySnmp does support SNMPv1/v2c/3 implimentations.
This was a simple test of using a common SNMPv2c implimentation.
From CLI example output:
Give me an IP to search for neighbors: 192.168.1.2
----------