Skip to content

Instantly share code, notes, and snippets.

@chaosblog
chaosblog / gist:2f3e40e990e11c6a2a73d9d7f2ebe0cc
Created March 5, 2020 08:41
Get AD password expiration date via RPC from linux
# get users id
rpcclient -U USERNAME%PASSWORD -c "lookupnames USERNAME" DOMAINCONTROLLER | grep -e '[0-9]\{4,9\} ' -o
# use user id to get expiration date
rpcclient -U USERNAME%PASSWORD -c "queryuser USERID" DOMAINCONTROLLER|grep must
@chaosblog
chaosblog / rotate.sh
Last active July 12, 2016 08:24
Rotate a video by 180 degrees
ffmpeg -noautorotate -i orignal.mp4 -vf "transpose=2,transpose=2,format=yuv420p" -metadata:s:v rotate=0 -codec:v libx264 -codec:a copy rotated.mp4
@chaosblog
chaosblog / check_vpn.sh
Created May 13, 2016 10:44
Check if openVPN connection is possible - if there is some output with some "@" - everything is fine.
echo -e "\x38\x01\x00\x00\x00\x00\x00\x00\x00" | timeout 10 nc -u SUBDOMAIN.DEINSERVER.DE 1194 | cat -v
@chaosblog
chaosblog / mqtt_log_example.py
Created March 2, 2016 09:50
How to print mqtt-debug-messages to the console
import paho.mqtt.client as mqtt
def on_log(client, userdata, level, string):
print(string)
client = mqtt.Client()
client.on_log = on_log

Keybase proof

I hereby claim:

  • I am chaosblog on github.
  • I am chaosblog (https://keybase.io/chaosblog) on keybase.
  • I have a public key whose fingerprint is CDF9 CE00 C75B 191B F769 4E26 4657 45E6 8BCE CF35

To claim this, I am signing this object: