Skip to content

Instantly share code, notes, and snippets.

View thotypous's full-sized avatar

Paulo Matias thotypous

View GitHub Profile
From a120be57d0645434de4ec3fe0db10d4fe68ee576 Mon Sep 17 00:00:00 2001
From: Paulo Matias <paulo.matias@usp.br>
Date: Sun, 2 May 2010 00:40:21 -0300
Subject: [PATCH] Make it possible to use client certificates to connect with a nodejs server, and make verifyPeer behaviour consistant.
---
src/node_crypto.cc | 21 ++++-----------------
1 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
From 8fa980873165ae02fb53317563f9f115e905d5c2 Mon Sep 17 00:00:00 2001
From: Paulo Matias <paulo.matias@usp.br>
Date: Sun, 2 May 2010 15:21:43 -0300
Subject: [PATCH] Read all records to always empty the OpenSSL reading buffer.
---
lib/net.js | 26 +++++++++++++++++++++-----
src/node_crypto.cc | 10 ++++++++++
src/node_crypto.h | 1 +
3 files changed, 32 insertions(+), 5 deletions(-)
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit pax-utils
DESCRIPTION="A Just-In-Time Compiler for the Lua* programming language."
HOMEPAGE="http://luajit.org/"
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit pax-utils
MY_P="${P/_/-}"
--- aiccu/common/ayiya.c.orig 2007-01-09 20:45:09.000000000 -0200
+++ aiccu/common/ayiya.c 2010-06-01 15:53:30.054314793 -0300
@@ -29,11 +29,19 @@
sha1_byte ayiya_hash[SHA1_DIGEST_LENGTH]; /* SHA1 Hash of the shared secret. */
TLSSOCKET ayiya_socket = NULL;
+static struct TIC_Tunnel *gTunnel = NULL;
+#ifndef _WIN32
+static pthread_t writer_thread = 0;
+#else
//
// SSH & SSL muxer - mux those restrictive proxies
//
// mux_interval
// |
// |\ |
// | \|
// ssl_port -----| \
// | |
// | |---- mux_port
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/input.h>
#include <mach/hardware.h>
#include <mach/gpio.h>
#include <mach/iomux-mx50.h>
#include <asm/uaccess.h>
@thotypous
thotypous / memread.lua
Created September 1, 2013 02:18
LuaJIT script to read Linux kernel memory in ARM architecture using /dev/mem
local ffi = require("ffi")
local C = ffi.C
ffi.cdef[[
static const int O_RDONLY = 0;
static const int SEEK_SET = 0;
int open(const char *, int, ...);
int close(int);
long int lseek(int, long int, int) __attribute__((__nothrow__, __leaf__));
int read(int, void *, unsigned int);
]]
@thotypous
thotypous / koboflquery.lua
Last active December 22, 2015 03:49
last_FL_duty query testing for Kobo Aura HD with kernel 2.6.35.3
local ffi = require("ffi")
local C = ffi.C
ffi.cdef[[
static const int O_RDONLY = 0;
static const int SEEK_SET = 0;
int open(const char *, int, ...);
int close(int);
long int lseek(int, long int, int) __attribute__((__nothrow__, __leaf__));
int read(int, void *, unsigned int);
]]
@thotypous
thotypous / myauth_login.py
Created January 8, 2015 03:14
MyAuth Login Daemon
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# This used to be useful in a time when Altamira-Brazil had only Wireless ISPs
# which were connected to the Internet through VSAT links. The only WISP at
# the time which was stable enough for a small commercial link used to employ
# as its authentication method a captive portal from a product named MyAuth,
# which they acquired from a third party. This was a script to keep it always
# logged in.
#