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
2018/01/14 20:09:41 [D] Session ID: <hidden> | |
2018/01/14 20:09:41 [D] CSRF Token: <hidden> | |
2018/01/14 20:09:42 [D] Template: user/dashboard/dashboard | |
==> xorm.log <== | |
2018/01/14 20:09:41 [I] [SQL] SELECT `id`, `lower_name`, `name`, `full_name`, `email`, `keep_email_private`, `passwd`, `login_type`, `login_source`, `login_name`, `type`, `location`, `website`, `rands`, `salt`, `created_unix`, `updated_unix`, `last_login_unix`, `last_repo_visibility`, `max_repo_creation`, `is_active`, `is_admin`, `allow_git_hook`, `allow_import_local`, `allow_create_organization`, `prohibit_login`, `avatar`, `avatar_email`, `use_custom_avatar`, `num_followers`, `num_following`, `num_stars`, `num_repos`, `description`, `num_teams`, `num_members`, `diff_view_style` FROM `user` WHERE `id`=? LIMIT 1 []interface {}{2} | |
2018/01/14 20:09:41 [I] [SQL] SELECT count(*) FROM `notification` WHERE user_id = ? AND status = ? []interface {}{2, 0x1} | |
2018/01/14 20:09:41 [I] [SQL] SELECT * FROM `org_user` LEFT JOIN `user` ON `org_user`.org_id=`use |
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
doc = document.getElementsByTagName("table")[6].children[0]; | |
total = 0 | |
for(i = 1;i< doc.children.length; i++) { | |
total += parseInt(doc.children[i].children[2].innerText) | |
} | |
alert(total) |
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
### curl 'http://2.2.2.2/ac_portal/login.php' --data 'opr=logout' | |
### curl 'http://2.2.2.2/ac_portal/login.php' --data 'opr=pwdLogin&userName={stuid}&pwd={stupwd}&rememberPwd=0' | |
import urllib.request | |
import urllib.parse | |
import json | |
import sys | |
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 | |
$appid = APPID; | |
$appkey = APPKEY; | |
$redirect_url = urlencode(REDIRECT_URL);//可以为跳板url,然后跳板url跳到这里来。域名可以不一样。 | |
$scope = "snsapi_userinfo";//snsapi_userinfo //这个可以不用关注; | |
$state = ""; | |
if(isset($_GET['code'])) { | |
$code = $_GET['code']; | |
$api_url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid={$appid}&secret={$appkey}&code={$code}&grant_type=authorization_code"; | |
$data_str = get($api_url); |
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
package main | |
import ( | |
"io" | |
"log" | |
"net" | |
"time" | |
) | |
func reader(r io.Reader) { |
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 | |
$ip = $_SERVER['REMOTE_ADDR']; | |
$time = $_SERVER['REQUEST_TIME']; | |
$maxPerSecond = 10; | |
try { | |
$redis = new Redis(); | |
$redis -> connect('127.0.0.1', 6379, 20); | |
$redis -> lpush($ip, $time); | |
if( | |
($redis -> llen ($ip) >= $maxPerSecond) && ($redis -> lrange($ip, $maxPerSecond - 1, $maxPerSecond - 1))[0] + 1 >= $time |