Protect Your Code

ak007

Member
Messages
216
Reaction score
0
Points
16
First Of All I apologize For My Bad English ;)
And Its The 0.2 Version Of The Tutorial I Will Update It Accordignly
Intro:
If You Are A Webdeveloper And Distributing Your Scripts Freely All Over The Net. So For The Credit You Will Include "Powered By Your Software" (Like In PHPBB,IPB,VB) At Somewhere in Your Page But You Know There Are Many Nasty User Who Will Remove "Powered by..." They Will Use the App Like Dreamweaver Find/Replace Function To Remove Which Will Search All The Files In The Folder And Replcae It So To Prevent Users To Remove The "Powered By.." Or Copyright Statement From Your Software Ive Written This Simple Tutorial

--------------------
Functions We Will Use:
base64_encode
base64_decode
--------------------
Ive Attached A Small App That Ive Written That Will Encode The Data in base64
And Also Decode The String That In Encoded In base64
Note: Please Don't Use This App As A Free Service On Your Website Because Its Not Secure!!

First Of All You Need To Enocde Your Copyright Statement Usinf the Script I Attached For Example :
Copyright 2Scripts 2005
After Encoding You Will Get :
Q29weXJpZ2h0IDJTY3JpcHRzIDIwMDU=

Now In Your Script Declare A New Variable And Set its Value To The Encoded Text and Echo It With after Decoding It Like
PHP:
$ctpy = "Q29weXJpZ2h0IDJTY3JpcHRzIDIwMDU=";
echo (base64_decode($ctpy));
Now The Normal User Can't Figure Out What That Means But We Need Our Statement More Secure So We Also Add Copyright Validation
We Create A Condition To Check Wether User Had Removed the Copyright IIf he Does The Script Will Throw An Error The Condition Statement We Also Have To Encode The Error Statement To Make It More Secure It Will look Like This
PHP:
if($ctpy !== "Q29weXJpZ2h0IDJTY3JpcHRzIDIwMDU="){
echo (base64_decode ("RXJyb3IgOiBQdXQgQmFjayB0aGUgQ29weXJpZ2h0IFN0YXRlbWVudA=="));
}
Please remove The White Spaces In The Above And Below Encoded statement (Something wrong With My browser i Can't Remove Them ;))
Note : Your Statement May Look Like Diffrent Change the "Q29weXJpZ2h0IDJTY3JpcHRzIDIwMDU=" And RXJyb3IgOiBQdXQgQmFjayB0aGUgQ29weXJpZ2h0IFN0YXRlbWVudA== Part Accordingly


After We Put All The Parts Ourt Script Will Look like This
PHP:
<?php
// Your PHP CODE.........


//Echoing  Copyright 
$ctpy = "Q29weXJpZ2h0IDJTY3JpcHRzIDIwMDU=";
 echo (base64_decode($ctpy));
// Starting Validation
if($ctpy !== "Q29weXJpZ2h0IDJTY3JpcHRzIDIwMDU="){
// Out put The Error
echo (base64_decode("RXJyb3IgOiBQdXQgQmFjayB0aGUgQ29weXJpZ2h0IFN0YXRlbWVudA=="));
}
?>

Comments,Questions,Suggestions Are Welcome ;)
 

Attachments

  • main.zip
    753 bytes · Views: 37
Last edited:

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
No offense, but I don't get the point for this.. Your "encrypting" your text/source in an "easy to decode" encryption....
 

ak007

Member
Messages
216
Reaction score
0
Points
16
Tutorial Edited
The Subject Here Is To Prevent Users To Remove the Copyright
And Most Of The Users Can't Understand The Above Technique Except GURUS Same Technique Is Used In Coppermine photo Gallery And Unreal portal For IPB
 
Last edited:
Top