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
:: plink from here: http://the.earth.li/~sgtatham/putty/latest/x86/plink.exe | |
:: Guide available here: http://blog.buttewifi.com/2010/01/dynamic-ssh-tunneling-with-putty-to-secure-web-traffic/ | |
:: Connects to 192.168.1.2 on port 5900. Sets up a SOCKS proxy that listens on 127.0.0.1 port 9876 and forwards all connections through the connection to 192.168.1.2. | |
:: You then need to configure your system to use 127.0.0.1:9876 as a SOCKS proxy. | |
putty\PLINK.EXE 192.168.1.2 -P 5900 -D 127.0.0.1:9876 -N | |
:: Gotcha: In Windows, you need to specifically enable it as a SOCKS proxy, and disable all other proxies. |
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 | |
# Built-in modules | |
import logging | |
import Tkinter | |
import threading | |
class TextHandler(logging.Handler): | |
"""This class allows you to log to a Tkinter Text or ScrolledText widget""" | |
def __init__(self, text): |
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
local function search_google(...) | |
local fields = {...}; | |
for i, field in ipairs( fields ) do | |
if (field.name == 'http.host') then | |
browser_open_url("https://www.google.com/search?q=" .. field.value) | |
break | |
end | |
end | |
end | |
register_packet_menu("HTTP/Search host in Google", search_google, "http.host"); |
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
<# | |
================ | |
PATCHEXTRACT.PS1 | |
================= | |
Version 1.25 Microsoft MSU Patch Extraction and Patch Organization Utility by Greg Linares (@Laughing_Mantis) | |
This Powershell script will extract a Microsoft MSU update file and then organize the output of extracted files and folders. | |
Organization of the output files is based on the patch's files and will organize them based on their archicture (x86, x64, or wow64) | |
as well as their content-type, ie: resource and catalog files will be moved to a JUNK subfolder and patch binaries and index files will |
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 | |
''' | |
Uses SURF to match two images. | |
Based on the sample code from opencv: | |
samples/python2/find_obj.py | |
USAGE | |
find_obj.py <image1> <image2> |
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
def chunks(chunkable, n): | |
""" Yield successive n-sized chunks from l. | |
""" | |
for i in xrange(0, len(chunkable), n): | |
yield chunkable[i:i+n] |
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
# Download launchpad bugs | |
import sys | |
import subprocess | |
import requests | |
from launchpadlib.launchpad import Launchpad | |
cachedir = '.' | |
launchpad = Launchpad.login_anonymously('just testing', 'production', cachedir, version='devel') |
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
struct node{ | |
// A node has two components: some data and a pointer to the next node. | |
int node_data; | |
node* next; | |
}; | |
int main(){ | |
// Make some nodes: | |
node A,B,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
#!/bin/sh | |
PROJECT_DIR="/home/moshe/Desktop/aircrack-ng" | |
COV_BUILD="/home/moshe/Downloads/cov-analysis-linux64-7.6.0/bin/cov-build" | |
PROJECT_NAME="aircrack-ng" | |
BUILD_DIR="/home/moshe/Desktop/aircrack-ng_cov/cov-int" | |
TAR_DIR="/home/moshe/Desktop/aircrack-ng_cov/" | |
BUILD_CMD="make sqlite=true experimental=true pcre=true -j 4" | |
# Prepare to build commands |
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 sys | |
from PIL import Image | |
from PIL.ExifTags import TAGS, GPSTAGS | |
def get_exif_data(image): | |
"""Returns a dictionary from the exif data of an PIL Image item. Also converts the GPS Tags""" | |
exif_data = {} | |
info = image._getexif() | |
if info: |
NewerOlder