-2

is it possible to block IP address if any user tried to access your WordPress website source code?

and i found this Wordpress plugin which does some sort of a activity like that.

https://codecanyon.net/item/hide-my-wp-amazing-security-plugin-for-wordpress/4177158 this plugin Notify you when someone is mousing about your WordPress site (included with visitor details like IP, user agent, referrer and even username!)

2 Answers2

0

Welcome to stackoverflow. The user send the ip automatic. So you can just filter it on the top of your Webpage.

<?php
if ($_session('REMOTE_ADDR') == 'the ip you want to block') {
    exit;
}
?>
Ôrel
  • 7,044
  • 3
  • 27
  • 46
Nico Zimmer
  • 325
  • 1
  • 12
0

While it is impossible to write a script that guarantees your server will be informed when the visitor is trying to look at the client-side source code (that's what client-side entails), it should be possible to detect whether the internal developer toolbox/console is opened in most browsers. Find out whether Chrome console is open

Another method you should consider to make it harder to reverse-engineer or mess with your code is using automatic code obfuscation before you deploy your website.

maths.js
  • 33
  • 6