Skip to content

Instantly share code, notes, and snippets.

View rraptorr's full-sized avatar

Janusz Dziemidowicz rraptorr

View GitHub Profile
@rraptorr
rraptorr / NetHttp.java
Last active October 30, 2018 12:26
Java TLS 1.3 resumption bug
package btest;
import java.io.InputStreamReader;
import java.net.URL;
public class NetHttp {
private static void get(String u) {
try {
var url = new URL(u);
@rraptorr
rraptorr / ct-submit.py
Last active April 3, 2023 10:19
Simple Certificate Transparency certificate submission client
#!/usr/bin/python
import sys
import argparse, json, base64, struct
import urllib2
from datetime import datetime
LOGS = {
'icarus': 'https://ct.googleapis.com/icarus',
'pilot': 'https://ct.googleapis.com/pilot',
@rraptorr
rraptorr / stunnel-4.56-xforwarded-for.diff
Created May 17, 2013 14:51
X-Forwarded-For stunnel 4.56 patch
diff --git a/doc/stunnel.8 b/doc/stunnel.8
index 7624a27..3593f24 100644
--- a/doc/stunnel.8
+++ b/doc/stunnel.8
@@ -753,6 +753,10 @@ This options has been renamed to \fInone\fR.
.RE
.RS 4
.RE
+.IP "\fBxforwardedfor\fR = yes | no" 4
+.IX Item "xforwardedfor = yes | no"
@rraptorr
rraptorr / notification.php
Created February 17, 2013 15:05
Sample PHP code to send notification using NK API from game to user.
<?php
$consumerKey = CONSUMER_KEY_FROM_APPLICATION_PANEL;
$consumerSecret = CONSUMER_SECRET_FROM_APPLICATION_PANEL;
$uid = USER_PERSON_ID;
require 'OAuth.php';
$url = 'http://opensocial.nk-net.pl/v09/social/rest/messages/@me/@self/@outbox';
$consumer = new OAuthConsumer($consumerKey, $consumerSecret);
@rraptorr
rraptorr / stunnel-4.54-xforwarded-for.diff
Created October 10, 2012 18:27
X-Forwarded-For stunnel 4.54 patch
diff --git a/doc/stunnel.8 b/doc/stunnel.8
index b0204d6..7f46be0 100644
--- a/doc/stunnel.8
+++ b/doc/stunnel.8
@@ -739,6 +739,10 @@ This options has been renamed to \fInone\fR.
.RE
.RS 4
.RE
+.IP "\fBxforwardedfor\fR = yes | no" 4
+.IX Item "xforwardedfor = yes | no"
@rraptorr
rraptorr / stunnel-4.53-xforwarded-for.diff
Created June 25, 2012 17:50
X-Forwarded-For stunnel 4.53 patch
diff --git a/doc/stunnel.8 b/doc/stunnel.8
index 589d968..f56f5c0 100644
--- a/doc/stunnel.8
+++ b/doc/stunnel.8
@@ -693,6 +693,10 @@ This options has been renamed to \fInone\fR.
.RE
.RS 4
.RE
+.IP "\fBxforwardedfor\fR = yes | no" 4
+.IX Item "xforwardedfor = yes | no"
@rraptorr
rraptorr / check_nk_payment.php
Created April 8, 2012 12:36
PHP script to check payment callback for nk.pl payment API
#!/usr/bin/php -H
<?php
function error($msg) {
echo "ERROR: $msg\n";
exit(2);
}
$required_options = array(
"key",