Skip to content

Instantly share code, notes, and snippets.

@moshekaplan
moshekaplan / plink_socks_proxy.bat
Last active March 22, 2024 08:12
plink SOCKS proxy short guide
@moshekaplan
moshekaplan / TextHandler.py
Last active February 25, 2024 01:33
A Logging Handler that allows logging to a Tkinter Text Widget
#!/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):
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");
@moshekaplan
moshekaplan / PatchExtract125.ps1
Created November 15, 2016 23:27 — forked from anonymous/PatchExtract125.ps1
Patch Extract v1.25 by Greg Linares (@Laughing_Mantis)
<#
================
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
@moshekaplan
moshekaplan / test_surf.py
Last active October 19, 2022 18:14
Demo for Python OpenCV SURF
#!/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>
def chunks(chunkable, n):
""" Yield successive n-sized chunks from l.
"""
for i in xrange(0, len(chunkable), n):
yield chunkable[i:i+n]
# 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')
@moshekaplan
moshekaplan / static_linked_list_demo.cpp
Created September 13, 2012 02:58
Simple example of creating a static 'Linked list' in C++
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;
@moshekaplan
moshekaplan / aircrack_coverity.sh
Created August 5, 2019 00:56
Aircrack Coverity build
#!/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
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: