Skip to content

Instantly share code, notes, and snippets.

View kn007's full-sized avatar
:octocat:
I may be slow to respond.

Karl Chen kn007

:octocat:
I may be slow to respond.
View GitHub Profile
@Someguy123
Someguy123 / deswappify.pl
Last active February 11, 2024 19:34 — forked from WGH-/deswappify.pl
#!/usr/bin/perl
use strict;
use Fcntl qw(SEEK_SET);
sub deswappify {
my $pid = shift;
my $fh = undef;
my $start_addr;
@hakasenyang
hakasenyang / index.php
Last active July 22, 2021 09:45
ssl.hakase.io source
<?php
// Tor Check : https://gist.github.com/TheRealBastiaan/889b4ec5fafd928e0de2
function IsTorExitPoint($ip=null){
$ip = ($ip) ? $ip : $_SERVER['REMOTE_ADDR'];
if (gethostbyname(ReverseIPOctets($ip).".".$_SERVER['SERVER_PORT'].".".ReverseIPOctets($_SERVER['SERVER_ADDR']).".ip-port.exitlist.torproject.org")=="127.0.0.2") {
return true;
} else {
return false;
}
}
#! /usr/bin/env bash
# More info at: https://github.com/elitak/nixos-infect
set -o pipefail
set -e
makeConf() {
# Skip everything if main config already present
[[ -e /etc/nixos/configuration.nix ]] && return 0
# NB <<"EOF" quotes / $ ` in heredocs, <<EOF does not
@CarterLi
CarterLi / add_proxy_ssl_alpn_directive.diff
Created June 15, 2018 09:34
Backport nginx patches from google nginx
From c45dfdd8d0c3de53b4f56610292a72ecad321362 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= <carter.li@eoitek.com>
Date: Fri, 15 Jun 2018 14:58:33 +0800
Subject: [PATCH] add "proxy_ssl_alpn" directive
---
src/event/ngx_event_openssl.c | 22 ++++++++++++++++++
src/event/ngx_event_openssl.h | 2 ++
src/http/modules/ngx_http_proxy_module.c | 29 ++++++++++++++++++++++++
src/http/modules/ngx_http_ssl_module.c | 2 --
@mrbar42
mrbar42 / README.md
Last active March 28, 2024 18:06
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@rohankhudedev
rohankhudedev / opcache.ini
Last active May 7, 2024 08:36
Best Zend OpCache Settings / Tuning / Configurations
[opcache]
; Determines if Zend OPCache is enabled
opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
;opcache.enable_cli=1
; The OPcache shared memory storage size.
opcache.memory_consumption=512
#!/usr/bin/env python2
# lrdcq
# usage python2 unwxapkg.py filename
import sys, os
import struct
class WxapkgFile(object):
nameLen = 0
var CryptoJS = require('crypto-js')
var request = require('request-promise')
/*
* npm install crypto-js request-promise request
* node wx_t1t_hack.js
*/
// export function testEncription(msg, fullKey) {
// var fullKey = fullKey.slice(0, 16)
@topjohnwu
topjohnwu / update_xposed.sh
Last active March 9, 2023 19:03
The script for updating all Systemless Xposed Modules
# /usr/bin/env bash
oxver=89 # The original version on official server
xver=89.3 # Our own version
xcode=8930 # Our own version code for Magisk module
progress() {
echo -e "\n\033[44m${1}\033[0m\n"
}
#!/usr/bin/perl
use strict;
sub deswappify {
my $pid = shift;
my $fh = undef;
my $start_addr, $end_addr;
if(open F, "/proc/$pid/smaps") {