Skip to content

Instantly share code, notes, and snippets.

View dhondta's full-sized avatar

Alex dhondta

View GitHub Profile
@dhondta
dhondta / git-repos-update.sh
Created September 20, 2019 11:10
Bash RC helper functions
# Custom git repos update function
git-repos-update() {
local currdir=$(pwd)
for root in /opt ~/.opt; do
for D in $root/*; do
if [ -d "${D}" ]; then
cd "${D}"
cat .git/config 2>/dev/null | \
grep url | \
cut -d" " -f 3 && \
@dhondta
dhondta / README.md
Last active April 27, 2020 19:55
Simple lexer module for parsing a line of arguments and keyword-arguments, useful for CLI tools

Arguments Lexer

Simple arguments lexer for parsing a line of arguments and keyword-arguments.

The ValueLexer evaluates strings (delimited by single or double quotes), booleans, floats, integers and also binary, octal or hexadecimal (to an integer).

The ArgumentsLexer ensures that the input line of arguments has the form:

arg1 arg2 ... argN kw1=val1 kw2=val2 ... kwM=valM
@dhondta
dhondta / latex-clean.sh
Created April 15, 2022 16:36 — forked from djsutherland/latex-clean.sh
A bash script to clean latex temp files
#!/bin/bash
# Note: you might prefer latexmk -c since latexmk is great. It doesn't clean all of these, but see
# https://tex.stackexchange.com/questions/83341/clean-bbl-files-with-latexmk-c/83386#83386
exts="-blx.aux -blx.bib -blx.bib .acn .acr .alg .algorithms .aux .bbl .bcf .blg .brf .dvi .fdb_latexmk .fls .glg"\
" .glo .gls .glsdefs .idx .ilg .ind .ist .keys .listing .loa .lof .log .lol .lot .maf .mtc .mtc0 .mw .nav .nlo"\
" .out .pdfsync .ptc .pyg .run.xml .snm .synctex.gz .syntex.gz(busy) .tdo .thm .toc .vrb .xdy"
for x in "${@:-.}"; do
@dhondta
dhondta / README.md
Last active July 31, 2023 22:14
Tinyscript tool for generating loose comparison hashes for PHP type juggling

PHP loose comparison input generator

This Tinyscript-based allows to generate a string with a given alphabet that has a given hash matching the format used for type juggling with PHP, that is when a loose comparison of the type ("0e12345" == ...) is used.

This can be installed using:

$ pip install tinyscript
$ tsm install loose-comparison-input-generator
@dhondta
dhondta / README.md
Last active July 31, 2023 22:15
Tinyscript tool to generate PDF's from reports in a STIX package

STIX report to PDF

This Tinyscript-based tool allows to decompres a STIX XML file and to output it as a PDF using pdfkit.

This can be installed using:

$ pip install bs4 pdfkit tinyscript
$ tsm install stix-reports-to-pdf
@dhondta
dhondta / README.md
Last active July 31, 2023 22:17
Tinyscript tool for replacing text in files from a target folder and based on a JSON dictionary of replacement patterns

DocTextMasker

A simple Tinyscript-based tool for recursively replacing disturbing/undesired text inside documents contained in a given folder based on a JSON dictionary defining regular expressions and the replacements to be applied.

This can be installed using:

$ pip install tinyscript
$ tsm install doc-text-masker
$ wget https://gist.githubusercontent.com/dhondta/5cae9533240471eac155bd51593af2e0/raw/replacements.json
@dhondta
dhondta / README.md
Last active July 31, 2023 22:17
Tinyscript tool for assembling audio files and altering frequencies and speed factor

Audio Assembler

This Tinyscript-based tool, based on PyDub, allows to append audio files, filter the result as voice frequency and alter the playback speed.

This can be installed using:

$ pip install tinyscript
$ tsm install audio-assembler
@dhondta
dhondta / README.md
Last active July 31, 2023 22:18
Tinyscript tool for filtering a wordlist from STDIN based on Fcrackzip-like criteria to STDOUT or a file

WLF

This Tinyscript-based tool allows to filter a wordlist from STDIN to STDOUT or an output file. This is particularly interesting for dictionary attacks.

This can be installed using:

$ pip install tinyscript
$ tsm install wlf
@dhondta
dhondta / README.md
Last active July 31, 2023 22:21
Modification of Firefox-Decrypt to support dictionary attack

Firefox-Decrypt modified for dictionary attack on master password

This script is the modification of this excellent project, a tool to extract passwords from Mozilla (Firefox™, Waterfox™, Thunderbird®, SeaMonkey®) profiles, to make it support dictionary attack. This is published as a Gist as the related PR was refused (for a reason I completely understand) and with the consent of the author.

$ pip install tinyscript
$ tsm install firefox_decrypt_modified

For the main options, please refer to the original project. You can provide a wordlist of master passwords for a dictionary attack as follows:

@dhondta
dhondta / README.md
Last active July 31, 2023 22:22
Tinyscript Proof-of-Concept tool using PyBots for exploiting an SSTI vulnerability in Craft CMS (CVE-2018-14716)

Craft CMS SEOmatic 3.1.4 SSTI Exploit (CVE-2018-14716)

This is an automation of this exploit using Tinyscript and Pybots for getting config settings or user properties.

$ pip install tinyscript
$ tsm install craftcms-seomatic-ssti