Skip to content

Instantly share code, notes, and snippets.

View KhasMek's full-sized avatar
⚠️
uncaught exception

Khas'Mek KhasMek

⚠️
uncaught exception
View GitHub Profile
#!/usr/bin/env python
#
# Parse the output file form generate_port_targets.py and test if the listed
# ports are open or closed.
# TODO:
# Filter unique ports and sort ports numerically
import csv
import select
import signal
@KhasMek
KhasMek / burp-uuid-intruder-generator.py
Created September 14, 2023 14:44 — forked from soufianetahiri/burp-uuid-intruder-generator.py
Burp plugin UUID Intruder generator
from burp import IBurpExtender
from burp import IIntruderPayloadGeneratorFactory
from burp import IIntruderPayloadProcessor
from burp import IIntruderPayloadGenerator
import uuid
class BurpExtender(IBurpExtender, IIntruderPayloadGeneratorFactory, IIntruderPayloadProcessor):
def registerExtenderCallbacks(self, callbacks):
# obtain an extension helpers object
self._helpers = callbacks.getHelpers()
@KhasMek
KhasMek / calibre_bulk_import_organize.py
Created February 25, 2020 20:40
Been slacking on adding all your ebooks to Calibre. This should help.
#!/usr/bin/env python3
"""
Bulk import new books, or existing books in new formats into your
calibre database.
Should this use native code instead of subprocess? Of couse, but
I'm lazy, knew the commands and didn't want to work more than I
needed to. Maybe someday I'll updated it to be more pretty.
"""
import json
#!/usr/bin/python3
"""
You can find a complete list of your steam games via:
account details -> Licenes and product key activations.
Copy all columns for this.
TODO:
- [x] Parse the full "csv" (tab sepparated) in order to utilize the date/method fields
- [-] "--since" flag to only add items newer than $date
- [-] "--before" flag to only add items older than $date
@KhasMek
KhasMek / hashlist.py
Last active October 30, 2019 16:31
Create a report on the specified directory with two worksheets as the output. One worksheet being unique file(s)/hashes, and the second being duplicate file(s)/hashes.
#!/usr/bin/python
import hashlib
import json
import os
import sys
import xlsxwriter
hashdict = {}
@KhasMek
KhasMek / shell_proxy.plugin.zsh
Created November 19, 2018 16:57
quick plugin for omz to (un)set shell proxies. Pretty rough atm.
#!/bin/zsh
#
# Sets and unsets a proxy address/port for the local shell
#
function enable_shell_proxy() {
if [[ -n "$1" ]]; then
proxy="$1"
else;
proxy="127.0.0.1:8080"
@KhasMek
KhasMek / open_random.py
Last active November 5, 2018 12:40
Open a random File. Default command to use is xdg open random file in current directory (and subdirectories). Modify defaults with the -c/--command and -d/--directory flags.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Open a random file
"""
# TODO:
# - add config file
# - history suppoort
@KhasMek
KhasMek / get_git_info.py
Created June 30, 2018 16:28
quick lookups for organization (and other types tba) sizes.
#!/usr/bin/env python3
#
# Requirements:
# - humanfriendly
# - pygithub
import humanfriendly
import sys
from github import Github
#!/usr/bin/python2 -u
#
# REQUIREMENTS:
# - sre_yield
#
# AUTHOR:
# - KhasMek
#
import datetime
import json
@KhasMek
KhasMek / unshorten.py
Last active April 11, 2018 13:38
unsorten the given url.
#!/usr/bin/env python2
import json
import httplib
import os
import sys
import urlparse
logging = True