[Plugin: Simple Login Log] show failed logins in a table and link to lookup service
-
I found a way to publish dangerous IP Addresses on my site by creating a post/page with the following php code. With dangerous I mean IP addresses that have many failed login attempts, trying to access my site.
For this You need a plugin that allows execution of php code within posts.
My question is how the IP addresses echoed in the table can be clickable and link to an IP Address geolocation service, such as https://whatismyipaddress.com/ip/184.168.193.63#Geolocation-Information (that IP has 4893 failed login attempts on my site!)
<?php echo "<table><tr><td><strong>IP</strong></td><td align=right><strong>No. of Attempts</strong></td><td align=right><strong>Last attempt</strong></td></tr>"; global $wpdb; $result = $wpdb->get_results( " SELECT ip AS IP, COUNT( ip ) AS 'Failed', MAX(Time) AS Latest FROM wp_simple_login_log WHERE login_result = '0' GROUP BY ip ORDER BY Failed DESC Limit 0,20 " ); foreach($result as $row) { echo "<tr><td>$row->IP</td><td align=right>$row->Failed</td><td align=right>$row->Latest</td></tr>"; } echo "</table>"; ?>
https://www.ads-software.com/extend/plugins/simple-login-log/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Simple Login Log] show failed logins in a table and link to lookup service’ is closed to new replies.