Changeset 3028595
- Timestamp:
- 01/30/2024 08:09:36 AM (23 months ago)
- Location:
- wp-code-protection/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (1 diff)
-
index.php (modified) (1 diff)
-
source-code-protection.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-code-protection/trunk/README.txt
r2894205 r3028595 4 4 Tags: Security, Threat, Rightclick disable, Disable CTRL A, C, X, U, S, and P, content protection 5 5 Requires at least: 3.8 6 Tested up to: 6. 26 Tested up to: 6.4.2 7 7 Stable tag: trunk 8 8 -
wp-code-protection/trunk/index.php
r2025636 r3028595 1 1 <?php 2 2 // Silence is golden. 3 ?> -
wp-code-protection/trunk/source-code-protection.php
r2598028 r3028595 1 1 <?php 2 /* Plugin Name: Source Code Protection3 Plugin URI: https://viitorcloud.com/blog/4 Description: It prevents common techniques in protecting your code from being stolen.5 Version: 1.0.06 Author:Viitorcloud7 Author URI:https://viitorcloud.com/8 */9 2 /** 10 * Basic plugin definitions 11 * 3 * Plugin Name: Source Code Protection 4 * Plugin URI: https://viitorcloud.com/blog/ 5 * Description: It prevents common techniques in protecting your code from being stolen. 6 * Version: 2.0.0 7 * Author: Viitorcloud 8 * Author URI: https://viitorcloud.com/ 9 * 10 * Basic plugin definitions 11 * 12 12 * @package Source Code Protection 13 13 * @since 1.0.0 14 14 */ 15 15 16 // Exit if accessed directly 17 if ( !defined( 'ABSPATH' ) ) exit; 16 // Exit if accessed directly. 17 if ( ! defined( 'ABSPATH' ) ) { 18 exit; 19 } 18 20 19 global $wpdb; 21 global $wpdb; 20 22 /** 21 23 * Activation hook 22 * 24 * 23 25 * Register plugin activation hook. 24 * 26 * 25 27 * @package Source Code Protection 26 28 * @since 1.0.0 … … 32 34 * 33 35 * Register plugin deactivation hook. 34 * 36 * 35 37 * @package Source Code Protection 36 38 * @since 1.0.0 … … 39 41 40 42 /** 41 * Plugin Setup Activation hook call back 43 * Plugin Setup Activation hook call back 42 44 * 43 * Initial setup of the plugin setting default options 45 * Initial setup of the plugin setting default options 44 46 * and database tables creations. 45 * 47 * 46 48 * @package Source Code Protection 47 49 * @since 1.0.0 48 50 */ 49 51 function source_code_protection_install() { 50 52 51 53 global $wpdb; 52 53 54 } 54 55 … … 63 64 */ 64 65 function source_code_protection_uninstall() { 65 66 66 67 global $wpdb; 67 68 68 } 69 69 … … 76 76 * @since 1.0.0 77 77 */ 78 add_filter( 'body_class', 'source_code_protection_body_classes', 999 );79 add_action( 'wp_head', 'source_code_protection_wp_head');78 add_filter( 'body_class', 'source_code_protection_body_classes', 999 ); 79 add_action( 'wp_head', 'source_code_protection_wp_head' ); 80 80 81 /* add class to body tag */ 82 function source_code_protection_body_classes( $classes ) 83 { 84 $classes[] = 'oncontextmenu'; 81 /** 82 * Add class to body tag. 83 * 84 * @param array $classes The current body classes. 85 * @return array The modified body classes. 86 */ 87 function source_code_protection_body_classes( $classes ) { 88 $classes[] = 'oncontextmenu'; 85 89 86 return $classes;90 return $classes; 87 91 } 88 92 /** … … 94 98 * @since 1.0.0 95 99 */ 96 function source_code_protection_wp_head(){ ?> 100 function source_code_protection_wp_head() { 101 ?> 97 102 <script type='text/javascript'> $ = jQuery; 98 103 $(document).ready(function(){ 99 $(document).contextmenu(function() {100 return false;101 });104 $(document).contextmenu(function() { 105 return false; 106 }); 102 107 }); 103 108 104 109 $('img').bind('oncontextmenu', function(e) { 105 return false;106 }); 110 return false; 111 }); 107 112 document.onkeydown = function(e) { 108 if(e.keyCode == 123) {109 return false;110 }111 if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)){112 return false;113 }114 if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)){115 return false;116 }117 if(e.ctrlKey && e.shiftKey && e.keyCode == 'K'.charCodeAt(0)){118 return false;119 }120 if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)){121 return false;122 }123 if(e.ctrlKey && e.keyCode == 'S'.charCodeAt(0)){124 return false;125 }126 if(e.ctrlKey && e.keyCode == 'C'.charCodeAt(0)){127 return false;128 }129 if(e.ctrlKey && e.keyCode == 'V'.charCodeAt(0)){ 130 return false;131 }132 if(e.ctrlKey && e.keyCode == 'A'.charCodeAt(0)){133 return false;134 }135 if(e.ctrlKey && e.keyCode == 'P'.charCodeAt(0)){136 return false;137 }113 if(e.keyCode == 123) { 114 return false; 115 } 116 if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)){ 117 return false; 118 } 119 if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)){ 120 return false; 121 } 122 if(e.ctrlKey && e.shiftKey && e.keyCode == 'K'.charCodeAt(0)){ 123 return false; 124 } 125 if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)){ 126 return false; 127 } 128 if(e.ctrlKey && e.keyCode == 'S'.charCodeAt(0)){ 129 return false; 130 } 131 if(e.ctrlKey && e.keyCode == 'C'.charCodeAt(0)){ 132 return false; 133 } 134 if(e.ctrlKey && e.keyCode == 'V'.charCodeAt(0)){ 135 return false; 136 } 137 if(e.ctrlKey && e.keyCode == 'A'.charCodeAt(0)){ 138 return false; 139 } 140 if(e.ctrlKey && e.keyCode == 'P'.charCodeAt(0)){ 141 return false; 142 } 138 143 } 139 144 </script>
Note: See TracChangeset
for help on using the changeset viewer.