Skip to content

Instantly share code, notes, and snippets.

View jay's full-sized avatar
🇺🇸

Jay Satiro jay

🇺🇸
  • New Rochelle, New York, United States
View GitHub Profile
@jay
jay / ValidateCert.js
Last active August 29, 2015 14:14
Excerpt from my Fiddler CustomRules.js of ValidateCert. https://groups.google.com/forum/#!topic/httpfiddler/cjGlrTWnnZk
static function Main() {
var today: Date = new Date();
FiddlerObject.StatusText = " CustomRules.js was loaded at: " + today;
// Uncomment to add a "Server" column containing the response "Server" header, if present
// FiddlerObject.UI.lvSessions.AddBoundColumn("Server", 50, "@response.server");
// https://groups.google.com/forum/#!topic/httpfiddler/RIjfLBU58Io
CONFIG.oAcceptedServerHTTPSProtocols = System.Security.Authentication.SslProtocols.Tls
| System.Security.Authentication.SslProtocols.Tls11
| System.Security.Authentication.SslProtocols.Tls12;
@jay
jay / ReorderCipherList.c
Last active December 22, 2015 04:14
Use libcurl to retrieve URL via HTTP2 using a reordered cipher list.
/* Use libcurl to retrieve URL via HTTP2 using a reordered cipher list.
Usage: ReorderCipherList <url>
This program deprioritizes HTTP/2 blacklisted ciphers in the client cipher
list and then uses that reordered list in its client handshake with the server.
Note that according to HTTP/2 RFC 7540 the blacklist enforcement is described
using the RFC semantic 'MAY' which is the same as 'OPTIONAL'. In this code I
refer to the ciphers as just blacklisted or banned.
@jay
jay / ShowLibcurlResolver.c
Last active December 28, 2015 02:53
Show the name of libcurl's resolver.
/* Show the name of libcurl's resolver.
Usage: ShowLibcurlResolver
"Is there a way to programmatically know if the version being used was compiled
with the threaded resolver?"
curl-library mailing list thread:
'segfaulting in Curl_num_addresses on OS X and Ubuntu'
http://curl.haxx.se/mail/lib-2015-08/0002.html
@jay
jay / GitHub-Ignore-Segoe-UI.css
Last active July 12, 2016 07:27
Revert some of GitHub's font changes made on 2016-07-11
@-moz-document domain("github.com") {
@font-face {
font-family: "Segoe UI";
font-weight: normal;
font-style: normal;
src: local("Arial");
}
@font-face {
@jay
jay / extract_last_modified.pl
Last active June 16, 2017 17:35
Extract the name of the last modified firefox archive from input.
#!/usr/bin/env perl
=begin comment
README
Extract the name of the last modified firefox archive from input.
Which archive is most recent is determined only by comparing 'last modified'
timestamps, the versions are not compared.
@jay
jay / setbrightness.bat
Last active November 10, 2017 05:02
Set the AC & DC brightness in the current power scheme.
:: Set the AC & DC brightness in the current power scheme.
::
:: Usage: "setbrightness.bat" <brightness-level>
::
:: Based on https://stackoverflow.com/a/26766798
:: Also see https://github.com/HubKing/LinkBrightness
::
:: Public Domain: No License. Written by Jay Satiro <raysatiro@yahoo.com>
::
:: https://gist.github.com/jay/2c4ca23314f1ed31c24da390d86c2b23
@jay
jay / ShowIPPort.c
Last active December 14, 2017 07:39
Use libcurl to show the local port and IP address in the progress function.
/* Use libcurl to show the local port and IP address in the progress function.
Usage: ShowIPPort <URL> [filename]
If filename is specified then the data received is saved to filename.tmp which
is then renamed to filename if the download was successful (2xx) or deleted if
not.
If filename is not specified then the data received is sent to stdout. If
stdout is attached to a tty and the data received appears to be binary data
@jay
jay / make_RunAtWinlogon.bat
Last active December 26, 2017 20:27
Build RunAtWinlogon program
:: This batch file builds the RunAtWinlogon program.
:: http://reboot.pro/files/file/255-runatwinlogon/
::
:: BUG: Although this builds both x86 and x64 versions it looks as though
:: ServiceKick.au3 needs to be changed if using x64 version from RunAtWinlogon
:: to RunAtWinlogon64.
::
:: The include and Aut2Exe directories are needed from autoit-v3.zip
:: https://www.autoitscript.com/site/autoit/downloads/
::
@jay
jay / ShowSSLInfo.c
Last active February 14, 2019 07:41
Use libcurl and OpenSSL to show SSL negotiated cipher and version.
/* Use libcurl and OpenSSL to show SSL negotiated cipher and version.
Usage: ShowSSLInfo
curl-library mailing list thread:
'CURLINFO_TLS_SESSION with OPENSSL returns SSL_CTX instead of SSL'
http://curl.haxx.se/mail/lib-2015-09/0127.html
Copyright (C) 2015 Jay Satiro <raysatiro@yahoo.com>
http://curl.haxx.se/docs/copyright.html
@jay
jay / test-schannel-ciphers.pl
Last active March 20, 2019 07:00
Test which Schannel (Windows SSL) ciphers work for curl --ciphers
#!/usr/bin/env perl
=begin comment
README
./test-schannel-ciphers.pl <CIPHERS.md> <curl> <host | ssl-url>
Test which Schannel (Windows SSL) ciphers work for curl --ciphers
Written in response to https://github.com/curl/curl/issues/3389