Skip to content

Instantly share code, notes, and snippets.

View jerrymannel's full-sized avatar
🍺
Cheers!

Jerry M. jerrymannel

🍺
Cheers!
View GitHub Profile
@EddiG
EddiG / wireshark.md
Last active March 31, 2024 10:34
How to decrypt SSL/TLS traffic in Wireshark on MacOS

The main point is to save the SSL/TLS keys those used by the web browser (SSLKEYLOGFILE=/tmp/tmp-google/.ssl-key.log).
In the example below we run brand new instance of Google Chrome (--user-data-dir=/tmp/tmp-google do the trick):
SSLKEYLOGFILE=/tmp/tmp-google/.ssl-key.log /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/tmp/tmp-google
Then run the Wireshark and open the Preferences -> Protocols -> SSL, where we put the path to the SSL keys log file into the (Pre)-Master-Secret log filename field.
Now all SSL/TLS traffic from this browser instance will be decrypted.

@jerrymannel
jerrymannel / rand.js
Last active January 16, 2018 08:21
Generate random number of given lentth
function (_i) {
var i = Math.pow(10, _i - 1);
var j = Math.pow(10, _i) - 1;
return ((Math.floor(Math.random() * (j - i + 1)) + i));
};
@dbr
dbr / jenkins_delete_failed.groovy
Created September 9, 2013 12:52
Delete failed builds for a job in Jenkins
def job = Jenkins.instance.getItem("the_job_name")
job.getBuilds().each {
if(it.result == Result.FAILURE){
// Delete failed job
it.delete()
}
}