Skip to content

Instantly share code, notes, and snippets.

@widdowquinn
widdowquinn / kali_osx_persistence_wifi.md
Last active January 28, 2024 06:32
Kali Linux Live USB with persistence and wireless on Macbook Pro

Kali Linux Bootable USB with Persistence and Wireless on OSX

Download the appropriate Kali Linux .iso

I used a 64 bit .iso image, downloaded via HTTP. I downloaded the amd64 weekly version, as the pool linux headers (needed below for installation of wireless drivers) were ahead of the stable release kernel.

Download the SHA256SUMS and SHA256SUMS.gpg files from the same location.

@mubix
mubix / infosec_newbie.md
Last active April 7, 2024 22:35
How to start in Infosec
@mlgill
mlgill / DropboxSync.py
Last active February 12, 2019 18:11 — forked from wrenoud/DropboxSync.py
DropboxSync: iOS (Pythonista), synchronizes all files to/from Dropbox directory
import os, sys, pickle, console, re
sys.path += ['lib']
import dropboxsetup
# dropbox_sync
# by Michelle L. Gill, michelle@michellelynngill.com
# requires my dropboxsetup module (https://gist.github.com/8311046)
# Change log
@miguelgrinberg
miguelgrinberg / rest-server.py
Last active March 29, 2024 09:05
The code from my article on building RESTful web services with Python and the Flask microframework. See the article here: http://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask
#!flask/bin/python
from flask import Flask, jsonify, abort, request, make_response, url_for
from flask_httpauth import HTTPBasicAuth
app = Flask(__name__, static_url_path = "")
auth = HTTPBasicAuth()
@auth.get_password
def get_password(username):
if username == 'miguel':
@destan
destan / text2png.py
Last active January 10, 2024 06:32
Python text to image (png) conversion with automatic new line calculation
# coding=utf8
import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw
def text2png(text, fullpath, color = "#000", bgcolor = "#FFF", fontfullpath = None, fontsize = 13, leftpadding = 3, rightpadding = 3, width = 200):
REPLACEMENT_CHARACTER = u'\uFFFD'
NEWLINE_REPLACEMENT_STRING = ' ' + REPLACEMENT_CHARACTER + ' '
# confirm you can access the internet
if [[ ! $(curl -Is http://www.google.com/ | head -n 1) =~ "200 OK" ]]; then
echo "Your Internet seems broken. Press Ctrl-C to abort or enter to continue."
read
fi
# make 2 partitions on the disk.
parted -s /dev/sda mktable msdos
parted -s /dev/sda mkpart primary 0% 100m
parted -s /dev/sda mkpart primary 100m 100%
@dgv
dgv / sample_wol.rb
Created June 4, 2012 02:05
Ruby Wake-On-Lan Script
#!/usr/bin/ruby
require 'socket'
begin
addr = ['<broadcast>', 9]
UDPSock = UDPSocket.new
UDPSock.setsockopt(Socket::SOL_SOCKET, Socket::SO_BROADCAST, true)
data = "\xFF\xFF\xFF\xFF\xFF\xFF"
arr = ARGV[0].split(':')
16.times do |i|
data<< arr[0].hex.chr+arr[1].hex.chr+arr[2].hex.chr+arr[3].hex.chr+arr[4].hex.chr+arr[5].hex.chr
@dex4er
dex4er / expect.pl
Created January 19, 2012 15:09
VPN via interactive session
#!/usr/bin/perl
# expect.pl (c) 2012 Piotr Roszatycki <dexter@debian.org>
use strict;
use Expect;
die "Usage: $0 cmd [-echo] expect1 send1 expect2 send2 ...\n"
unless @ARGV;
@dex4er
dex4er / base64.sh
Last active April 3, 2024 08:13
Perl oneliners
# Encoding file
perl -MMIME::Base64 -0777 -ne 'print encode_base64($_)' < file
# Decoding file
perl -MMIME::Base64 -ne 'print decode_base64($_)' < file.b64
# HMAC-SHA1
perl -MDigest::HMAC_SHA1 -le '$_=Digest::HMAC_SHA1->new($ARGV[0])->add($ARGV[1])->b64digest; $_.="=" x length % 4; print' TestKey TestString