WordPress.org

Plugin Directory

Changeset 1599011


Ignore:
Timestamp:
02/19/17 09:38:46 (8 months ago)
Author:
peter achutha
Message:

moved data directory to /uploads/ directory. shows those who tried to login through /admin/

Location:
dpabadbotwp/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • dpabadbotwp/trunk/dpabadbotWP-functionality.php

    r1193031 r1599011  
    33 * Plugin Name: dpaBadBotWP 
    44 * Plugin URI: https://www.dpabadbot.com/wordpress-plugins/dpabadbotwp-helper-for-dpabadbot.php 
    5  * Description: dpaBadtBotWP is a plugin to be used with The Bad Bot Exterminator, dpaBadBot, firewall shield php program. The dpaBadBotWP plugin sends dpaBadBot your IP address automatically, so that you will not be blocked. You need to purchase dpaBadBot separately before using this plugin, dpaBadBotWP. dpaBatBot (not the plugin) can lock up WordPress so that no one can login - stops hackers from logging in and can track who are your visitors. By tracking visitors it blocks hackers, spiders, crawlers, scrappers, all of whom overload your server and hack your site. You can manually block by IP address and by spider or bad bot name. Add multiuser tracking of IP addresses. And for safety sake, this plugin stops WordPress automatic core updates. Had problems with the upper and lower case file names. Please delete older versions before uploading this version. 
    6  * Version: 1.16 [20150706] 
     5 * Description: dpaBadtBotWP is a plugin to be used with The Bad Bot Exterminator, dpaBadBot, firewall shield php program. The dpaBadBotWP plugin sends dpaBadBot your IP address automatically, so that you will not be blocked. You need to purchase the Bad Bot Extermnator separately before using this plugin, dpaBadBotWP. The Bad Bot Extermnator can lock up WordPress so that no one can login - stops hackers from logging in and can track who are your visitors. By tracking visitors it blocks hackers, spiders, crawlers, scrappers, all of whom overload your server and hack your site. You can manually block by IP address and by spider or bad bot name. Add multiuser tracking of IP addresses. And for safety sake, this plugin stops WordPress automatic core updates.  
     6 * Version: 1.17 [20170219] 
    77 * Author: Dr. Peter Achutha 
    88 * Author URI: https://www.facebook.com/peter.achutha 
     
    6464$wppathstr = dirname(__FILE__) ; //initialise data so that it will not give trouble later 
    6565$spmywp_string_position = strripos( $spmywp_datadir , 'dpabadbotwp'); 
    66 $spmywp_datadiralt = substr_replace( $spmywp_datadir , 'dpabadbotwpdata' , $spmywp_string_position  ); 
     66$spmywp_datadiraltold = substr_replace( $spmywp_datadir , 'dpabadbotwpdata' , $spmywp_string_position  ); 
     67 
     68$spmywp_plugins_dir = dirname(__FILE__); //not url anymore 
     69$spmywp_plugins_namearray = explode( '/', $spmywp_plugins_dir ); 
     70$spmywp_plugins_namearraysz = count( $spmywp_plugins_namearray ); 
     71$spmywp_plugins_name = $spmywp_plugins_namearray[ $spmywp_plugins_namearraysz -1 ]; 
     72$spmywp_plugindir = str_replace( '/wp-content/plugins', '/wp-content/uploads', dirname(__FILE__)); 
     73$spmywp_datadiralt = $spmywp_plugindir; //.'/'.$spmywp_plugins_name ; 
     74 
    6775 
    6876$spmywp_dpabadbot_setup_file = $spmywp_datadiralt .'/setup.txt'; 
     
    135143$wppathstr = dirname(__FILE__) ; //initialise data so that it will not give trouble later 
    136144$spmywp_string_position = strripos( $spmywp_datadir , 'dpabadbotwp'); 
    137 $spmywp_datadiralt = substr_replace( $spmywp_datadir , 'dpabadbotwpdata' , $spmywp_string_position  ); 
     145$spmywp_datadiraltold = substr_replace( $spmywp_datadir , 'dpabadbotwpdata' , $spmywp_string_position  ); 
     146 
     147$spmywp_plugins_dir = dirname(__FILE__); //not url anymore 
     148$spmywp_plugins_namearray = explode( '/', $spmywp_plugins_dir ); 
     149$spmywp_plugins_namearraysz = count( $spmywp_plugins_namearray ); 
     150$spmywp_plugins_name = $spmywp_plugins_namearray[ $spmywp_plugins_namearraysz -1 ]; 
     151$spmywp_plugindir = str_replace( '/wp-content/plugins', '/wp-content/uploads', dirname(__FILE__)); 
     152$spmywp_datadiralt = $spmywp_plugindir; //.'/'.$spmywp_plugins_name ; 
     153$spmywp_dpabadbot_uploads_ip_file = $spmywp_datadiralt.'/'.'wpipapp.txt'; 
     154 
    138155$spmywp_dpabadbot_setup_file = $spmywp_datadiralt .'/setup.txt'; 
    139 $spmywp_dpabadbot_monitor_file = $spmywp_datadiralt .'/monitor.txt'; 
     156//$spmywp_dpabadbot_monitor_file = $spmywp_datadiralt .'/monitor.txt'; 
    140157 
    141158 
    142159//echo ' <br>2. setup file : '.$spmywp_dpabadbot_setup_file.'  ' ; 
     160$spmywp_dpabadbot_setup_tmp =''; 
     161$spmywp_dpabadbot_setup_sz = 0; 
     162if( file_exists( $spmywp_dpabadbot_setup_file )){ 
    143163$spmywp_dpabadbot_setup_tmp = spmy_dpabadbot_read_file( $spmywp_dpabadbot_setup_file ); 
    144164$spmywp_dpabadbot_setup_data = unserialize( $spmywp_dpabadbot_setup_tmp ); 
    145165//echo '<br>3. [0] : '.$spmywp_dpabadbot_setup_data[0].'  & [1] : '.$spmywp_dpabadbot_setup_data[1].'  '; 
    146166$spmywp_dpabadbot_setup_sz = count( $spmywp_dpabadbot_setup_data ); 
     167} 
    147168if( strlen( $spmywp_dpabadbot_setup_tmp ) > 2 && $spmywp_dpabadbot_setup_sz > 0 ){ 
    148169    $spmywp_dpabadbot_path = $spmywp_dpabadbot_setup_data[0]; 
     
    156177$spmywp_dpabadbot_datadir = $spmywp_dpabadbot_path.'data/'; 
    157178$spmywp_dpabadbot_ip_file = $spmywp_dpabadbot_path.'data/wpipadd.txt'; 
    158  
     179$spmywp_dpabadbot_uploads_ip_file = $spmywp_datadiralt.'/'.'wpipapp.txt'; 
    159180 
    160181//declare the function 
     
    166187$spmywp_datadiralt = substr_replace( $spmywp_datadir , 'dpabadbotwpdata' , $spmywp_string_position  ); 
    167188 
     189 
     190$spmywp_plugins_dir = dirname(__FILE__); //not url anymore 
     191$spmywp_plugins_namearray = explode( '/', $spmywp_plugins_dir ); 
     192$spmywp_plugins_namearraysz = count( $spmywp_plugins_namearray ); 
     193$spmywp_plugins_name = $spmywp_plugins_namearray[ $spmywp_plugins_namearraysz -1 ]; 
     194$spmywp_plugindir = str_replace( '/wp-content/plugins', '/wp-content/uploads', dirname(__FILE__)); 
     195$spmywp_datadiralt = $spmywp_plugindir; //.'/'.$spmywp_plugins_name ; 
     196$spmywp_dpabadbot_uploads_ip_file = $spmywp_datadiralt.'/'.'wpipapp.txt'; 
     197 
    168198$spmywp_dpabadbot_setup_file = $spmywp_datadiralt .'/setup.txt'; 
     199$spmywp_dpabadbot_setup_tmp =''; 
     200$spmywp_dpabadbot_setup_sz = 0; 
     201if( file_exists( $spmywp_dpabadbot_setup_file ) ){ 
    169202$spmywp_dpabadbot_setup_tmp = spmy_dpabadbot_read_file( $spmywp_dpabadbot_setup_file ); 
    170203$spmywp_dpabadbot_setup_data = unserialize( $spmywp_dpabadbot_setup_tmp ); 
    171204$spmywp_dpabadbot_setup_sz = count( $spmywp_dpabadbot_setup_data ); 
     205} 
    172206 
    173207if( strlen( $spmywp_dpabadbot_setup_tmp ) > 2 && $spmywp_dpabadbot_setup_sz > 0 ){ 
     
    176210    $spmywp_dpabadbot_datadir = $spmywp_dpabadbot_path.'data/'; 
    177211    $spmywp_dpabadbot_ip_file = $spmywp_dpabadbot_path.'data/wpipadd.txt'; 
     212 
    178213    if( file_exists( $spmywp_dpabadbot_datadir ) ){ 
    179         if( file_exists( $spmywp_dpabadbot_ip_file ) ){  
    180             $spmywp_dpabadbot_ip_tmp = spmy_dpabadbot_read_file( $spmywp_dpabadbot_ip_file ) ; 
     214        if( file_exists( $spmywp_dpabadbot_uploads_ip_file ) ){  
     215            $spmywp_dpabadbot_ip_tmp = spmy_dpabadbot_read_file( $spmywp_dpabadbot_uploads_ip_file ) ; 
    181216            if( strlen( $spmywp_dpabadbot_ip_tmp ) > 6 ){//find all ip addresses older than 2 days and delete 
    182217            $spmywp_dpabadbot_ip_addrs = unserialize( $spmywp_dpabadbot_ip_tmp ); 
     
    187222                    }    
    188223                } 
    189             spmy_dpabadbot_write_file( $spmywp_dpabadbot_ip_file, serialize( $spmywp_dpabadbot_ip_addrs) );  
     224            spmy_dpabadbot_write_file( $spmywp_dpabadbot_uploads_ip_file, serialize( $spmywp_dpabadbot_ip_addrs) );  
     225            foreach( $spmywp_dpabadbot_ip_addrs as $mykey => $myvalue){ 
     226                if( $spmywp_dpabadbot_ip_addrs[$mykey][3] > 0 ){ 
     227                $spmywp_dpabadbot_ip_addrs_tmp[$mykey] = $spmywp_dpabadbot_ip_addrs[$mykey]; 
     228                //echo '<br>1. key '.$mykey; 
     229                    //unset( $spmywp_dpabadbot_ip_addrs[$mykey] ); 
     230                    }    
     231                } 
     232                spmy_dpabadbot_write_file( $spmywp_dpabadbot_ip_file, serialize( $spmywp_dpabadbot_ip_addrs_tmp) );  
    190233            } 
    191234     
    192235            $spmywp_dpabadbot_ip = spmy_dpabadbot_get_client_ip();  //get ip address 
    193             $spmywp_dpabadbot_ip_tmp = spmy_dpabadbot_read_file( $spmywp_dpabadbot_ip_file ); 
     236            $spmywp_dpabadbot_ip_tmp = spmy_dpabadbot_read_file( $spmywp_dpabadbot_uploads_ip_file ); 
    194237            if( strlen( $spmywp_dpabadbot_ip_tmp ) > 6 ){ 
    195238                $spmywp_dpabadbot_ip_addrs = unserialize( $spmywp_dpabadbot_ip_tmp ); 
     
    197240                if( !isset( $spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip] ) ){ 
    198241                $spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip][0] = $spmywp_dpabadbot_ip ; 
    199                 $spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip][1] = time() ;               
    200                 spmy_dpabadbot_write_file( $spmywp_dpabadbot_ip_file, serialize( $spmywp_dpabadbot_ip_addrs) ); 
     242                $spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip][1] = time() ;   
     243                $spmywp_dpabadbot_current_user = wp_get_current_user(); 
     244                $spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip][2] = $spmywp_dpabadbot_current_user->user_login; 
     245                $spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip][3] = $spmywp_dpabadbot_current_user->ID; 
     246                $spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip][4] = $_SERVER['REQUEST_URI']; 
     247                spmy_dpabadbot_write_file( $spmywp_dpabadbot_uploads_ip_file, serialize( $spmywp_dpabadbot_ip_addrs) ); 
     248                if( $spmywp_dpabadbot_current_user->ID > 0 ){ 
     249                foreach( $spmywp_dpabadbot_ip_addrs as $mykey => $myvalue){ 
     250                if( $spmywp_dpabadbot_ip_addrs[$mykey][3] > 0 ){ 
     251                $spmywp_dpabadbot_ip_addrs_tmp[$mykey]  = $spmywp_dpabadbot_ip_addrs[$mykey]; 
     252                //echo '<br>2. key '.$mykey; 
     253                    //unset( $spmywp_dpabadbot_ip_addrs[$mykey] ); 
     254                    }    
     255                } 
     256                spmy_dpabadbot_write_file( $spmywp_dpabadbot_ip_file, serialize( $spmywp_dpabadbot_ip_addrs_tmp) ); 
     257                } 
    201258                } 
    202259                 
     
    208265} 
    209266 
    210 //  $spmywp_dpabadbot_ip = spmy_dpabadbot_get_client_ip(); 
    211 //  $spmywp_dpabadbot_tempstr = $spmywp_dpabadbot_ip.', '; 
    212 //  $spmywp_dpabadbot_temptime = time(); 
    213 //  $spmywp_dpabadbot_tempstr = $spmywp_dpabadbot_tempstr.$spmywp_dpabadbot_temptime.', '; 
    214 //  $spmywp_dpabadbot_tempstr = $spmywp_dpabadbot_tempstr.date("Y M j D H:i:s", $spmywp_dpabadbot_temptime).', '; 
    215 //  $spmywp_dpabadbot_tempstr = $spmywp_dpabadbot_tempstr.getenv('REQUEST_URI').', '; 
    216 //  $spmywp_dpabadbot_tempstru = trim( getenv('HTTP_USER_AGENT') ); 
    217 //  if( $spmywp_dpabadbot_tempstru == '' ){ 
    218 //  $spmywp_dpabadbot_tempstru = 'BLANK' ; 
    219 //  } 
    220 //  $spmywp_dpabadbot_tempstr = $spmywp_dpabadbot_tempstr.$spmywp_dpabadbot_tempstru.', '; 
    221 //  $spmywp_dpabadbot_tempstre = trim( getenv('HTTP_REFERER')); 
    222 //  if( $spmywp_dpabadbot_tempstre == '' ){ 
    223 //  $spmywp_dpabadbot_tempstre = 'BLANK' ; 
    224 //  } 
    225 //  $spmywp_dpabadbot_tempstr = $spmywp_dpabadbot_tempstr.$spmywp_dpabadbot_tempstre."\n";   
    226 //  spmy_dpabadbot_append_file( $spmywp_dpabadbot_monitor_file, $spmywp_dpabadbot_tempstr ); 
    227          
     267 
     268 
     269 
    228270if ( is_admin() ){ 
    229271 
     
    235277        add_action( 'publish_post', 'spmy_dpabadbot_post_numbers' );    //update post 
    236278    if( file_exists( $spmywp_dpabadbot_datadir ) ){ 
    237         if( file_exists( $spmywp_dpabadbot_ip_file ) ){  
    238             $spmywp_dpabadbot_ip_tmp = spmy_dpabadbot_read_file( $spmywp_dpabadbot_ip_file ); 
     279        if( file_exists( $spmywp_dpabadbot_uploads_ip_file ) ){  
     280            $spmywp_dpabadbot_ip_tmp = spmy_dpabadbot_read_file( $spmywp_dpabadbot_uploads_ip_file ); 
    239281            if( strlen( $spmywp_dpabadbot_ip_tmp ) > 2 ){ 
    240282                $spmywp_dpabadbot_ip_addrs = unserialize( $spmywp_dpabadbot_ip_tmp ); 
     
    254296            $spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip][0] = $spmywp_dpabadbot_ip; 
    255297            $spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip][1] = time(); 
    256             spmy_dpabadbot_write_file( $spmywp_dpabadbot_ip_file, serialize( $spmywp_dpabadbot_ip_addrs) ); 
    257             } 
    258     } 
    259     } 
     298            $spmywp_dpabadbot_current_user = wp_get_current_user(); 
     299            $spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip][2] = $spmywp_dpabadbot_current_user->user_login; 
     300            $spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip][3] = $spmywp_dpabadbot_current_user->ID; 
     301            $spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip][4] = $_SERVER['REQUEST_URI']; 
     302            spmy_dpabadbot_write_file( $spmywp_dpabadbot_uploads_ip_file, serialize( $spmywp_dpabadbot_ip_addrs) ); 
     303            foreach( $spmywp_dpabadbot_ip_addrs as $mykey => $myvalue){ 
     304                if( $spmywp_dpabadbot_ip_addrs[$mykey][3] > 0 ){ 
     305                $spmywp_dpabadbot_ip_addrs_tmp[$mykey] = $spmywp_dpabadbot_ip_addrs[$mykey]; 
     306                //echo '<br>3. key '.$mykey; 
     307                    //unset( $spmywp_dpabadbot_ip_addrs[$mykey] ); 
     308                    }    
     309                } 
     310            spmy_dpabadbot_write_file( $spmywp_dpabadbot_ip_file, serialize( $spmywp_dpabadbot_ip_addrs_tmp) ); 
     311            } 
     312        } 
    260313    } 
    261314//  if( function_exists( 'spmy_dpabadbot_deleteipadd')) { 
     
    266319        spmy_dpabadbot_deleteipadd(); 
    267320        } 
    268 } 
    269  
     321    } 
     322} 
    270323add_filter( 'auto_update_core', '__return_false' ); 
    271324     
  • dpabadbotwp/trunk/readme.txt

    r1576940 r1599011  
    33Tags: bad bot, hack, security, brute force login, block hackers, ddos attack 
    44Requires at least: 3.9.1 
    5 Tested up to: 4.2.2 
     5Tested up to: 4.7.2 
    66License URI: https://www.dpabadbot.com/wordpress-plugins/dpabadbotwp-helper-for-dpabadbot.php 
    7 Stable tag: 1.16  [20150706] 
     7Stable tag: 1.17  [20170219] 
    88 
    99 
     
    8383corrected the link to two other websites. 
    8484 
     85== 1.17 == 
     86Added display ID and username of those who logged in and moved data directory to /uploads/ directory in line with WordPress standard 
     87 
    8588== Upgrade Notice == 
    8689== 1.01 == 
     
    120123== 1.16 == 
    121124corrected the link to two other websites. 
     125 
     126== 1.17 == 
     127Added display ID and username of those who logged in and moved data directory to /uploads/ directory in line with WordPress standard 
  • dpabadbotwp/trunk/spmy_dpabadbot_form.php

    r1193031 r1599011  
    3030$wppathstr = dirname(__FILE__) ; //initialise data so that it will not give trouble later 
    3131$spmywp_string_position = strripos( $spmywp_datadir , 'dpabadbotwp'); 
    32 $spmywp_datadiralt = substr_replace( $spmywp_datadir , 'dpabadbotwpdata' , $spmywp_string_position  ); 
     32$spmywp_datadiraltold = substr_replace( $spmywp_datadir , 'dpabadbotwpdata' , $spmywp_string_position  ); 
     33 
     34$spmywp_plugins_dir = dirname(__FILE__); //not url anymore 
     35$spmywp_plugins_namearray = explode( '/', $spmywp_plugins_dir ); 
     36$spmywp_plugins_namearraysz = count( $spmywp_plugins_namearray ); 
     37$spmywp_plugins_name = $spmywp_plugins_namearray[ $spmywp_plugins_namearraysz -1 ]; 
     38$spmywp_plugindir = str_replace( '/wp-content/plugins', '/wp-content/uploads', dirname(__FILE__)); 
     39$spmywp_datadiralt = $spmywp_plugindir; //.'/'.$spmywp_plugins_name ; 
     40//echo '<br>upload dir: '.$spmywp_datadiralt; 
     41$spmywp_dpabadbot_uploads_ip_file = $spmywp_datadiralt.'/'.'wpipapp.txt'; 
    3342 
    3443$spmywp_dpabadbot_setup_file = $spmywp_datadiralt .'/setup.txt'; 
    35 $spmywp_dpabadbot_setup_fileORG = dirname(__FILE__) .'/setup.txt'; 
     44$spmywp_dpabadbot_setup_fileORG = $spmywp_datadiraltold.'/setup.txt'; 
    3645//$wppathstr = str_replace( 'wp-content/plugins/dpabadbotwp/setup.txt', '', $spmywp_dpabadbot_setup_file); 
    3746$spmywp_strpos = strripos( $spmywp_datadir, 'wp-content' ); 
     
    3948    $wppathstr = substr( $spmywp_datadir, 0, $spmywp_strpos  ); 
    4049    } 
    41 if( !file_exists( $spmywp_datadiralt ) ){ 
    42 mkdir( $spmywp_datadiralt ); 
     50 
     51if( !file_exists( $spmywp_datadiralt ) ){   //if old file exists read it and save it in uploads directory 
     52mkdir( $spmywp_datadiralt );     
     53            //then delete the old directory 
    4354if( file_exists( $spmywp_dpabadbot_setup_fileORG ) ){ 
    44     $spmywp_tempstr = spmy_bowpp_read_file( $spmywp_dpabadbot_setup_fileORG ); 
    45     spmy_bowpp_write_file( $spmywp_dpabadbot_setup_file, $spmywp_tempstr ); 
     55 
     56    $spmywp_tempstr = spmy_dpabadbot_read_file( $spmywp_dpabadbot_setup_fileORG ); 
     57    spmy_dpabadbot_write_file( $spmywp_dpabadbot_setup_file, $spmywp_tempstr ); 
     58    unlink( $spmywp_dpabadbot_setup_fileORG ); 
     59    chdir( $spmywp_datadiraltold ); 
     60    $spmywp_dpabadbot_pft = '*.*'; 
     61    foreach (glob($spmywp_dpabadbot_pft) as $spmywp_dpabadbot_filename) { //foreach (glob("*.png") as $filename) { 
     62        if(file_exists( $spmywp_dpabadbot_filename) ){ 
     63            //ensure no erros from unlink as now have to change permission before deleting 2015/04/13 
     64            $spmywp_dpabadbot_rtn = chmod( $spmywp_dpabadbot_filename, 0764); 
     65            unlink( $spmywp_dpabadbot_filename ); 
     66            } 
     67        } 
     68    rmdir( $spmywp_datadiraltold ) ; 
     69    chdir( $spmywp_plugins_dir ); 
    4670    } 
    4771}    
    4872//echo '<br>alt dir: '.$spmywp_datadiralt.'  '; 
    4973$spmywp_datadiraltrtn = chmod($spmywp_datadiralt, 0775); 
    50 //if( $spmywp_datadiraltrtn == true ){ 
    51 //echo '<br>success in changing permissions'; 
    52 //} else { 
    53 //echo '<br>failed to change permissions'; 
    54 //} 
    55  
    56  
    57 //echo '<br>datadir: '.$spmywp_datadir.'  ' ;    
    58 //echo '<br>datadiralt: '.$spmywp_datadiralt.'  ' ; 
    59 //echo '<br>$spmywp_dpabadbot_setup_file: '.$spmywp_dpabadbot_setup_file.'  ' ;  
    60 //echo '<br>$spmywp_dpabadbot_setup_fileORG: '.$spmywp_dpabadbot_setup_fileORG.'  ' ; 
    6174 
    6275 
     
    130143<?php 
    131144$spmywp_dpabadbot_ip = spmy_dpabadbot_get_client_ip(); 
    132 echo '<br><span style="color:red;font-size:24px;font-style:normal;">Welcome to dpaBadBot<b>WP</b> Setup (Version 1.16 [20150703]) </span>'; 
     145echo '<br><span style="color:red;font-size:24px;font-style:normal;">Welcome to dpaBadBot<b>WP</b> Setup (Version 1.17 [20170217]) </span>'; 
    133146echo '<p><span style="color:blue;font-size:14px;font-style:normal;">dpaBadBot is a php program that was developed to block hacker attacks on WordPress, Joomla, ... and other websites. Please visit our website at <a target="_blank" href="https://www.dpabadbot.com">https://www.dpabadbot.com</a> for more details on dpaBadBot that blocks hackers, stops brute force login attempts and defends against ddos attacks.</span></p> 
    134147<p><span style="color:blue;font-size:14px;font-style:normal;">This plugin, dpaBadBot<b>WP</b>, sets up the data file that holds your current IP address so that you will not be blocked from accessing your site. Whenever you are logged into WordPress, your current IP address is recorded so that dpaBadBot does not block your access to your site.</span></p> 
    135148<p><span style="color:blue;font-size:14px;font-style:normal;">By its self this plugin will not be useful if you had not purchased <a target="_blank" href="https://www.dpabadbot.com">dpaBadBot</a>.</span></p> 
    136149<p><span style="color:darkblue;font-size:14px;font-style:normal;">If you are not sure where dpaBadBot is located please run dpaBadBot and look at menu option <span style="color:brown;">Setup > Setup Blog Security or Blog Upgrade</span> for the directory pathname of dpaBadBot.</span></p>  '; 
    137 /* 
    138 $spmywp_dpabadbot_sysmem = memory_get_usage(false );  
    139 $spmywp_dpabadbot_sysallmem = memory_get_usage(true );  
    140 $spmywp_dpabadbot_sysmemlimit = filter_var(ini_get("memory_limit"), FILTER_SANITIZE_NUMBER_INT)*1024*1024; //ini_get('memory_limit'); 
    141 $spmywp_dpabadbot_sysmemlimitM  = ini_get("memory_limit") ; 
    142 $spmywp_dpabadbot_sysmempeak = memory_get_peak_usage ( true ); 
    143 echo '<br><br><table><tr><td>memory used by PHP script: </td><td style="text-align:right">'.number_format($spmywp_dpabadbot_sysmem).' </td><td> Bytes </td></tr><tr><td>memory used allocated: </td><td style="text-align:right">'.number_format($spmywp_dpabadbot_sysallmem).' </td><td> Bytes </td></tr><tr><td>memory system limit: </td><td style="text-align:right">'.number_format($spmywp_dpabadbot_sysmemlimit).'</td><td> Bytes or '.$spmywp_dpabadbot_sysmemlimitM.' </td></tr><tr><td>memory system peak usage: </td><td style="text-align:right">'.number_format($spmywp_dpabadbot_sysmempeak).'</td><td> Bytes </td></tr></table>' ; 
    144 */ 
     150 
    145151$spmy_dpabadbot_sysmem = memory_get_usage(false ); 
    146152$spmy_dpabadbot_sysmemM = $spmy_dpabadbot_sysmem /1048576 ; 
     
    188194$spmywp_dpabadbot_ip_file = $spmywp_dpabadbot_path.'data/wpipadd.txt'; 
    189195$spmywp_dpabadbot_posts_file = $spmywp_dpabadbot_path.'config/wpposts.txt'; 
     196 
    190197//echo '<br>$spmywp_dpabadbot_datadir : '.$spmywp_dpabadbot_datadir.' '; 
    191198//echo '<br>$spmywp_dpabadbot_ip_file : '.$spmywp_dpabadbot_ip_file.' '; 
     
    210217if( file_exists( $spmywp_dpabadbot_datadir ) ){ 
    211218//if( file_exists( $spmywp_dpabadbot_datadir ) ){ 
    212     if( file_exists( $spmywp_dpabadbot_ip_file ) ){  
    213         $spmywp_dpabadbot_ip_tmp = spmy_dpabadbot_read_file( $spmywp_dpabadbot_ip_file ); 
     219    if( file_exists( $spmywp_dpabadbot_uploads_ip_file ) ){  
     220        $spmywp_dpabadbot_ip_tmp = spmy_dpabadbot_read_file( $spmywp_dpabadbot_uploads_ip_file ); 
    214221        if( strlen( $spmywp_dpabadbot_ip_tmp ) > 2 ){ 
    215222            $spmywp_dpabadbot_ip_addrs = unserialize( $spmywp_dpabadbot_ip_tmp ); 
     
    217224        } 
    218225//  } 
     226/* 
    219227$spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip][0] = $spmywp_dpabadbot_ip; 
    220228$spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip][1] = time(); 
     229$spmywp_dpabadbot_current_user = wp_get_current_user(); 
     230$spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip][2] = $spmywp_dpabadbot_current_user->user_login; 
     231$spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip][3] = $spmywp_dpabadbot_current_user->ID; 
     232$spmywp_dpabadbot_ip_addrs[$spmywp_dpabadbot_ip][4] = $_SERVER['REQUEST_URI']; 
    221233spmy_dpabadbot_write_file( $spmywp_dpabadbot_ip_file, serialize( $spmywp_dpabadbot_ip_addrs) ); 
    222  
     234*/ 
    223235$spmywp_dpabadbot_ip_sz = count( $spmywp_dpabadbot_ip_addrs ); 
    224236$spmywp_dpabadbot_ip_tmp = serialize( $spmywp_dpabadbot_ip_addrs ); 
     
    227239 
    228240<h2><span style="color:blue;font-size:18px;font-style:normal;">The IP Addresses you have used</span></h2> 
     241If the ID = 0 the username would be blankh. This means that the hacker could not login<br> 
    229242<form action="<? echo htmlspecialchars( $_SERVER['REQUEST_URI'] ) ; ?>"  method="post"> 
    230243<table border="1"> 
     
    232245<th>IP Address</th> 
    233246<th>Date</th> 
     247<th>Username</th> 
     248<th>ID</th> 
     249<th>URI</th> 
    234250<?php 
    235251$spmywp_dpabadbot_i=0; 
     
    237253        $spmywp_dpabadbot_i++; 
    238254        $spmywp_dpabadbot_tmp1 =  $spmywp_dpabadbot_ip_addrs[$mykey][1] + $spmywp_dpabadbot_setup_data[1]  ; 
    239         echo '<tr><td>'.$spmywp_dpabadbot_i.'</td><td>'.$spmywp_dpabadbot_ip_addrs[$mykey][0].'</td><td>'.date( "Y/M/d l H:i:s", $spmywp_dpabadbot_tmp1 ).'</td></tr>'; 
     255        echo '<tr><td>'.$spmywp_dpabadbot_i.'</td><td>'.$spmywp_dpabadbot_ip_addrs[$mykey][0].'</td><td>'.date( "Y/M/d l H:i:s", $spmywp_dpabadbot_tmp1 ).'</td><td>'.$spmywp_dpabadbot_ip_addrs[$mykey][2].'</td><td>'.$spmywp_dpabadbot_ip_addrs[$mykey][3].'</td><td>'.$spmywp_dpabadbot_ip_addrs[$mykey][4].'</td></tr>'; 
    240256} 
    241257?> 
     
    260276$spmywp_dpabadbot_plugins_dir = plugins_url().'/dpabadbotwp'; 
    261277?> 
    262 <h3>Other Products by Software Propulsion</h3> 
     278<h3>Other Products by Peter Publishing</h3> 
    263279<table width="800"> 
    264280<tr><td style="color:darkblue;font-size:14px;font-style:normal;vertical-align:top;"><span style="color:red;">SuperFast Cache</span> - very fast cache for WordPress. SuperFast Cache is in 2 modules. The 1st is the Cache Controller, in superfastcahce - a WordPress Plugin & the 2nd is built into The Bad Bot Exterminator & Firewall Shield.</td><td style="vertical-align:top;"><a target="_blank" href="https://www.dpabadbot.com/wordpress-plugins/super-fast-cache-controller-and-php-accelerator-amazing-web-page-speed.php"><img src="<?php echo $spmywp_dpabadbot_plugins_dir.'/sfc30.png'; ?>" width="402" height="30"></a></td></tr> 
    265281<tr><td style="color:darkblue;font-size:14px;font-style:normal;vertical-align:top;"><span style="color:red;">The Bad Bot Exterminator & Firewall Shield</span> Very effective anti hacking software that blocks hackers, stop brute force login attemtps and defends against ddos attacks to protect your WordPress website</td><td style="vertical-align:top;"><a target="_blank" href="https://www.dpabadbot.com"><img src="<?php echo $spmywp_dpabadbot_plugins_dir.'/bbbh30.png'; ?>" width="402" height="30"></a></td></tr> 
    266 <tr><td style="color:blue;font-size:14px;font-style:normal;vertical-align:top;"><span style="color:red;">XFC a fast cache combined with an anti hacking firewall for php developers</span> - Not for WordPress, Joomla or other blogs but for other php websites. PHP Caching & Firewall Shield</td><td style="vertical-align:top;"><a target="_blank" href="http://www.xfcphpcache.com"><img src="<?php echo $spmywp_dpabadbot_plugins_dir.'/xfch30.png'; ?>" width="402" height="30"></a></td></tr> 
    267282<tr><td style="color:blue;font-size:14px;font-style:normal;vertical-align:top;"><span style="color:red;">Web Hosting Services</span> - from budget hosting to high performance sites.</td><td style="vertical-align:top;"><a target="_blank" href="http://www.peterpublishing.com"><img src="<?php echo $spmywp_dpabadbot_plugins_dir.'/webhostingservicesh30.png'; ?>" width="405" height="30"></a></td></tr> 
    268 <tr><td style="color:blue;font-size:14px;font-style:normal;vertical-align:top;"><span style="color:red;">dpaContactUs</span> - Contact Form that makes life difficult for spammers. Multiple websites can share one email address.</td><td style="vertical-align:top;"><a target="_blank" href="http://www.dpacontactus.com"><img src="<?php echo $spmywp_dpabadbot_plugins_dir.'/cufh30.png'; ?>" width="402" height="30"></a></td></tr> 
    269283</table> 
    270284<?php 
Note: See TracChangeset for help on using the changeset viewer.