Wednesday, April 6, 2022

Groovy one-liner to check passwords stored in ICM Person table

Passwords are stored as MD5 hashes in the UCCE/PCCE/ICM Person table*. If you ever need to check for weak passwords, use the following one-liner:
assert passwordEncryptedInDb.replace("{enc:1}","").decodeBase64()
==
passwordPlain.digest('md5').decodeHex()
And of course, we get the passwordEncryptedInDb value using
SELECT per.Password FROM Person per 
JOIN Agent ag ON ag.PersonID = per.PersonID 
WHERE ag.PeripheralNumber = @loginId
* non-SSO

Saturday, February 12, 2022

WAV file / Youtube video → GStreamer → RTP/UDP stream → CiscoTerminal

GStreamer makes streaming "from" a G.711 audio file easy.

6001.wav is already encoded as G.711uLaw:


$ gst-launch-1.0 -v filesrc location = /home/greg/jars/audio/6001.wav ! wavparse ! rtppcmupay ! udpsink host=127.0.0.1 port=19001

 

And with ffmpeg and yt-dlp:


gst-launch-1.0 -v souphttpsrc location=$(yt-dlp -x -g https://www.youtube.com/watch?v=ljnxZypkjn0) ! decodebin ! audioconvert ! audioresample ! mulawenc ! rtppcmupay ! udpsink host=127.0.0.1 port=19001