This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _salt($string, $len=null) | |
{ | |
return (!empty($len)) ? | |
hash('sha512', str_pad($string, (strlen($string) + $len), | |
substr(hash('sha512', $string), | |
round((float)strlen($string)/3, 0, | |
PHP_ROUND_HALF_UP), | |
($len - strlen($string))), | |
STR_PAD_BOTH)) : | |
hash('sha512', substr($string, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dd if=/dev/zero of=file.iso bs=516096 seek=9182 count=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.fn.tool = function(method) { | |
var defaults = defaults || { | |
foo: 'bar' | |
}; | |
var methods = methods || { | |
init: function(opts) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hostname | |
h=`hostname` | |
# Command to read input & mask it | |
cmd='read -sp "Enter password: " pass' | |
# Path to aide integrity tool | |
a="/usr/bin/aide" | |
# Path to aide policy database | |
adb="/var/lib/aide" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/php | |
<?php | |
echo "Generating private key..."; | |
$key = openssl_pkey_new(array('digest_alg' => 'sha512', | |
'private_key_type' => OPENSSL_KEYTYPE_RSA, | |
'private_key_bits' => 2048)); | |
echo "done\n"; | |
echo "============================\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @function _getRealIPv4 | |
* @abstract Try all methods of obtaining 'real' IP address | |
*/ | |
function _getRealIPv4() | |
{ | |
return (getenv('HTTP_CLIENT_IP') && $this->_ip(getenv('HTTP_CLIENT_IP'))) ? | |
getenv('HTTP_CLIENT_IP') : | |
(getenv('HTTP_X_FORWARDED_FOR') && $this->_forwarded(getenv('HTTP_X_FORWARDED_FOR'))) ? | |
$this->_forwarded(getenv('HTTP_X_FORWARDED_FOR')) : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string.h> | |
bool _vCC(char *cc) | |
{ | |
int n=1; | |
int d, t=0; | |
int i=strlen(cc); | |
string d; | |
if ((cc!=0)||(strlen(cc)!=0)){ | |
for (i>0;i--){ | |
d=substr(cc, i-1, 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
/* returns tls authorization */ | |
_a: function(o) | |
{ | |
return o.authorized ? 'authorized' : 'unauthorized: '+o.authorizationError; | |
}, | |
/* returns connecting host */ | |
_host: function(o) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE: 6VQUjoo5smbnNvxtandOx0kz => {"fieldCount":0,"affectedRows":0,"insertId":0,"serverStatus":2,"warningCount":0,"message":"","protocol41":true,"changedRows":0} | |
GET / 304 1076ms | |
SEARCH: 6VQUjoo5smbnNvxtandOx0kz => [[{"sid":"6VQUjoo5smbnNvxtandOx0kz","session":{"type":"Buffer","data":[123,34,115,105,100,34,58,34,52,49,101,100,101,102,102,48,45,97,56,52,100,45,52,53,101,56,45,56,51,50,102,45,102,48,49,102,99,54,56,54,52,48,51,49,34,125]},"expires":1371139476,"agent":"ec0ff2af80b4e76fc39ddc1ab6d9899bc0371765b0ad51ead3f80574db86fbb6","ip":"f9292b96ff7d66abe0820bbe9bd022cb0abd37bd673d7b462e1bba84245a9f66","referer":"node.dev"}],{"fieldCount":0,"affectedRows":0,"insertId":0,"serverStatus":2,"warningCount":0,"message":"","protocol41":true,"changedRows":0}] | |
DELETE: bA-W_9KQYD9UwkSGfiMFyLV_ => {"fieldCount":0,"affectedRows":1,"insertId":0,"serverStatus":2,"warningCount":0,"message":"","protocol41":true,"changedRows":0} | |
DELETE: bA-W_9KQYD9UwkSGfiMFyLV_ => {"fieldCount":0,"affectedRows":0,"insertId":0,"serverStatus": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# requires the sshpass binary from http://en.sourceforge.jp/projects/sfnet_sshpass/releases/ | |
read -sp "Enter username: " user | |
read -sp "Enter password: " pass | |
read -sp "Enter command: " cmd | |
# define a list of machines | |
machines=array('192.168.1.10', '192.168.1.11', '192.168.1.12') |
OlderNewer