Skip to content

Instantly share code, notes, and snippets.

View colin-stubbs's full-sized avatar
🎯
Focusing

Colin Stubbs colin-stubbs

🎯
Focusing
View GitHub Profile
#!/usr/bin/env python
"""
Performs NMAP Scan(s) and tests SSH Connections (If desired)
"""
import argparse
import json
import socket
import nmap
import paramiko
@jasonrahm
jasonrahm / file_upload.py
Created November 14, 2015 04:26
Upload files to F5 BIG-IP with the iControl REST API.
def _upload(host, creds, fp):
chunk_size = 512 * 1024
headers = {
'Content-Type': 'application/octet-stream'
}
fileobj = open(fp, 'rb')
filename = os.path.basename(fp)
if os.path.splitext(filename)[-1] == '.iso':
uri = 'https://%s/mgmt/cm/autodeploy/software-image-uploads/%s' % (host, filename)
@ogrrd
ogrrd / dnsmasq OS X.md
Last active May 14, 2024 08:39
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@btoews
btoews / merger.py
Created May 17, 2012 16:55
Merging Nessus Files
# file: merger.py
# based off: http://cmikavac.net/2011/07/09/merging-multiple-nessus-scans-python-script/
# by: mastahyeti
import xml.etree.ElementTree as etree
import shutil
import os
first = 1
for fileName in os.listdir("."):