This file contains 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
<?php | |
class Blink | |
{ | |
public $account = [ | |
'credentials' => [ | |
'email' => '', | |
'password' => '', | |
], | |
'region' => 'rest-prod.immedia-semi.com', |
This file contains 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/sh | |
if [ ! -z "${1}" ]; then user="${1}"; else user=""; fi | |
users=/usr/local/directadmin/data/users | |
virtual=/etc/virtual | |
for u in `ls ${users}/*/users.list`; | |
do | |
r=`echo ${u} | cut -d/ -f7` | |
if [ -z "${user}" ]; then echo -e "R: ${r}"; fi | |
for u in `cat ${u}; echo ${r}`; |
This file contains 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
<?php | |
/* | |
First, create API Projects at https://www.vimexx.nl/api | |
Second, replace all vars between [] with credentials from previous step! | |
Third, see below; | |
$vimexx = (new \Vimexx([account], 'wefact')); | |
var_export($vimexx->post('/domains')); | |
var_dump($vimexx->client('whmcs')->post('/domain/dns', ['sld' => 'achterstraat', 'tld' => 'com'])); | |
var_export($vimexx->client('wefact')->post('/domains')); | |
*/ |
This file contains 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 fetch_parsed_body($object = false) | |
$result = json_decode($data, true); | |
if(is_null($result)) | |
{ | |
$result = []; | |
$lines = urldecode($this->result_body); | |
foreach(array_filter(explode("\n", $lines), 'strlen') as $line) | |
{ | |
$key = (preg_match('~^([A-Z]{1,5})\=~', $line) ? strtok($line, '=') : false); | |
if(empty($key)) |
This file contains 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 secret($string, $action = 'encrypt', $secret = 'random', $host = 'achterstraat.com', $method = 'AES-256-CBC') | |
{ | |
switch($action) | |
{ | |
case 'decrypt': { | |
return openssl_decrypt(base64_decode($string), $method, hash('sha256', $secret), 0, mb_substr(hash('sha256', $host), 0, 16)); | |
} | |
default: { | |
return base64_encode(openssl_encrypt($string, $method, hash('sha256', $secret), 0, mb_substr(hash('sha256', $host), 0, 16))); | |
} |
This file contains 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 license($string, $validate = false) | |
{ | |
$licenses = [ | |
'specials' => [ | |
'koninklijk' => '~^AA(\d{2})$~', | |
'buitenlands' => '~^(B|G)N\d{4}$~', | |
'diplomatiek' => '~^CD[ABFJNST](\d{1,3})$~', | |
'NAVO' => '~^RC(\d{4})$~', | |
'militair' => '~^(DF|(\d{2})?(K(A|L-Z)|L(M|O|U)|MC|DM))~', | |
'landbouw' => '~^GV~', |