PHP blacklist engine ready to work

Your ads will be inserted here by

Google Adsense.

Please go to the plugin admin page to set up your ad code.

As i have written here http://blog.evilcoder.net/php-ip-blacklist-script/ i have created that ip blacklist engine .
Today i have finished with API and all the stuff and now this engine can give some results.
Of course i couldn’t stay and take each ip from my long spam list to add it as blacklisted so i have modified my wp blog so i can have a nice button to click-and-report :D
Here it is a small part of the code .

How i did it ?
From line 458 to 471 i have changed the code with my own so
wp-admin/class-wp-comments-list-table.php

Your ads will be inserted here by

Google Adsense.

Please go to the plugin admin page to set up your ad code.

 
 
		if ( $this->user_can ) {
			if ( !empty( $comment->comment_author_email ) ) {
				comment_author_email_link();
				echo '<br />';
			}
			echo '<a href="edit-comments.php?s=';
			comment_author_IP();
			echo '&amp;mode=detail';
			if ( 'spam' == $comment_status )
				echo '&amp;comment_status=spam';
			echo '">';
			comment_author_IP();
			echo '</a>';
		}

WIll be :
wp-admin/class-wp-comments-list-table.php

 
 
		if ( $this->user_can ) {
			if ( !empty( $comment->comment_author_email ) ) {
				comment_author_email_link();
				echo '<br />';
			}
			echo '<a target="_blank" href="http://dev.phpize.net/add-compromised.php?api=[API KEY]&ip=';
			comment_author_IP();
			echo '&amp;reason=spam';
			if ( 'spam' == $comment_status )
				echo '&amp;reason=spam';
			echo '"><img src="images/report.png" alt="report" title="report spam"/></a>';
		}

Watch out that [API KEY] needs to be replaced with a valid key obtained from http://dev.phpize.net/.
When everything is properly set blog admin can submit spam IP addreses directly in our database.

Please reply is other info are needed.

Your ads will be inserted here by

Google Adsense.

Please go to the plugin admin page to set up your ad code.

avatar

Alex Gabriel

Weird php programer , bloger , computer forensics addict . In my free time (if any) i lose few hours google'ing for interesting stuff .

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code lang=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>