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
DROP PROCEDURE IF EXISTS `chanageCharSet`; | |
CREATE PROCEDURE `chanageCharSet`() | |
BEGIN | |
DECLARE done INT DEFAULT FALSE; | |
DECLARE scheamName VARCHAR(100); | |
DECLARE tableName VARCHAR(100); | |
DECLARE columnName VARCHAR(100); | |
DECLARE columnType VARCHAR(100); | |
DECLARE alertSql VARCHAR(200); | |
DECLARE _Cur CURSOR FOR ( |
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/env make | |
TARGET=./build | |
ARCHS=amd64 386 | |
LDFLAGS="-s -w" | |
GCFLAGS="all=-trimpath=$(shell pwd)" | |
ASMFLAGS="all=-trimpath=$(shell pwd)" | |
GOPATH=$(shell go env GOPATH) | |
SOURCE="./cmd/" | |
APPNAMES=test1 test2 |
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
func csrfMiddleware(c *gin.Context) { | |
method := strings.ToUpper(c.Request.Method) | |
if method == "POST" || method == "PUT" || method == "DELETE" { | |
if _csrf, err := CSRFToken(c.GetHeader("X-Csrf-Token")); err != nil || _csrf != "csrf" { | |
logger.Errorln(err, _csrf) | |
c.AbortWithStatusJSON(http.StatusBadRequest, Resp{ | |
Code: -1, | |
Msg: "CSRF Validate Error", | |
}) | |
return |
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
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA' --prune-empty --tag-name-filter cat -- --all | |
git for-each-ref --format='delete %(refname)' refs/original | git update-ref --stdin | |
git reflog expire --expire=now --all | |
git gc --prune=now | |
git push origin --force --all |
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 | |
$classes = get_declared_classes(); | |
foreach ($classes as $class) { | |
$methods = get_class_methods($class); | |
foreach ($methods as $method) { | |
if (in_array($method, [ | |
'__destruct', | |
'__toString', | |
'__wakeup', |
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 | |
function gen($pl) { | |
$aa = ""; | |
$bb = ""; | |
for ($j = 0; $j < strlen($pl); $j++) { | |
for ($i = 0xa0; $i < 0xff; $i++) { | |
if (preg_match('/[\x00- 0-9A-Za-z\'"\`~_&.,|=[\x7F]+/i', chr($i)) == 0) { | |
$t = chr($i) ^ $pl[$j]; | |
if (preg_match('/[\x00- 0-9A-Za-z\'"\`~_&.,|=[\x7F]+/i', $t) == 0) { |
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
FROM python:3-alpine3.9 | |
# git clone https://gitee.com/gy071089/SecurityManageFramwork.git | |
# cd SecurityManageFramwork | |
COPY . /app/ | |
WORKDIR /app | |
# TODO: django -> django==2.1.7 | |
RUN python -m pip install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com -r requirements.txt |
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
function sendData(data, tag = "t") { | |
if (data.length <= 0) { | |
return; | |
} | |
// str2hex | |
var val = ""; | |
var html = ""; | |
for (var i = 0; i < data.length; i++) { | |
val += data.charCodeAt(i).toString(16); | |
} |
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
export LDFLAGS="-L/usr/local/opt/openssl/lib \ | |
-L/usr/local/opt/sqlite/lib \ | |
-L/usr/local/opt/curl-openssl/lib \ | |
-L/usr/local/opt/webp/lib \ | |
-L/usr/local/opt/jpeg/lib \ | |
-L/usr/local/opt/libpng/lib \ | |
-L/usr/local/opt/freetype/lib \ | |
-L/usr/local/opt/gettext/lib \ | |
-L/usr/local/opt/gmp/lib \ | |
-L/usr/local/opt/unixodbc/lib \ |
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
export LDFLAGS="-L/usr/local/opt/openssl/lib \ | |
-L/usr/local/opt/sqlite/lib \ | |
-L/usr/local/opt/curl-openssl/lib \ | |
-L/usr/local/opt/webp/lib \ | |
-L/usr/local/opt/jpeg/lib \ | |
-L/usr/local/opt/libpng/lib \ | |
-L/usr/local/opt/freetype/lib \ | |
-L/usr/local/opt/gettext/lib \ | |
-L/usr/local/opt/gmp/lib \ | |
-L/usr/local/opt/icu4c/lib \ |
NewerOlder