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 | |
if (!isset($_GET['url'])) { | |
http_response_code(400); | |
die('oops!'); | |
} else { | |
$url = $_GET['url']; | |
} | |
if (filter_var($url, FILTER_VALIDATE_URL) === FALSE) { | |
http_response_code(400); |
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
ErrorDocument 404 /404.html | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^([^\.]+)$ $1.php [NC,L] |
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
bool CheckMMX() | |
{ | |
const DWORD EDX_MMX_BIT = 0x800000;// 23 bit | |
int cpu_info[4] = { -1 }; | |
__cpuid(cpu_info, 0); | |
if (cpu_info[0] >= 1) | |
{ | |
__cpuid(cpu_info, 1); |
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
var http = require('http'); | |
var https = require('https'); | |
var httpProxy = require('./libs/http-proxy'); | |
const util = require('util'); | |
// reverse proxy | |
var dstProtocol = 'https'; | |
var dstDomain = 'doingproxy.appspot.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
import math | |
import re | |
import urllib, urllib2 | |
def caesar_decrypt(data, line_num): | |
matrix = [] | |
line_length = int(math.ceil(len(data) / float(line_num))) | |
aligned_line_num = line_num - (line_num * line_length - len(data)) |
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
#include <windows.h> | |
#include <ntsecapi.h> | |
#pragma comment(lib, "Secur32.lib") | |
bool didUserLogined() | |
{ | |
ULONG logonSessionCount = 0; | |
PLUID logonSessionList = NULL; | |
NTSTATUS status = LsaEnumerateLogonSessions( |
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
set shell = WScript.CreateObject("WScript.Shell") | |
choice = MsgBox("Are you sure to hibernate now?", 36, "Hibernate") | |
if choice = vbYes then | |
shell.run "rundll32.exe powrprof.dll,SetSuspendState" | |
end if |
NewerOlder