Hide codes from Source Code Viewer

Started on the old forum in March 2009 · view the original in the archive · old links redirect here

12 replies · 2,446 views · started 17 years ago · 1 min read

6 participants
anderson Developer · 146 posts #1

hello coders, how to hide my site codes(wml) from a source code viewer sothat no one can view my site script code. Talks on it. I need it very much.

Wait...

subzero Super moderator Fellow · 3,954 posts #2

Forget about that Only way to hide that is encode your site in md5

But I will say this ONCE mobile phones cant see your site once its md5 coded😲

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

anderson Developer · 146 posts #3

Thanks sub. But I saw a site that is in wml but source code viewer doesnt work there. @ sub

Wait...

subzero Super moderator Fellow · 3,954 posts #5

Or source code site you can easy get this script right here at this forum !

also most phone cant view java script also they mite come thou:)

http://coding-talk.com/f14/source-codes-small-scripts-360/index3.html

lol there is the script for you.

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

djlee Developer · 224 posts #6

2 things to remember: 1. You cant hide the generated source from a browser, u can encrypt the php and other dynamic files so they can be read but the right click > view source code cant be hid, anyone that tells you otherwise needs to learn how a browser works 2. You can use javascript to obfuscate the generated source code. Either by using obfuscation basic JS encryption techniques or there is another way (dunno what to call it) but it only makes it a little harder to get the source, not impossible, anyone with a little knowledge will bypass it

Anshul Senior · 296 posts #7

in html u can do it by

<?
// Page HTML-source encrypter
// (c) Sergey Kozub, skiv@softhome.net, http://cleverscripts.com
//
// Usage notes: 
//
// just put  include('csource.php') in the beginning
// of your script. The HTML content will be automatically
// encrypted via Base64 algorithm so nobody can view it.

function _fwk_filter_encrypt($content) 
{ 
  $table = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@"; 
  $xor = 165; 

  // Prepare encoding table 
  $table = array_keys(count_chars($table, 1)); 
  $i_min = min($table); 
  $i_max = max($table); 
  for ($c = count($table); $c > 0; $r = mt_rand(0, $c--)) 
    array_splice($table, $r, $c - $r, array_reverse(array_slice($table, $r, $c - $r))); 
     
  // Encode sequence 
  $len = strlen($content); 
  $word = $shift = 0; 
  for ($i = 0; $i < $len; $i++) 
  { 
    $ch = $xor ^ ord($content[$i]); 
    $word |= ($ch << $shift); 
    $shift = ($shift + 2) % 6; 
    $enc .= chr($table[$word & 0x3F]); 
    $word >>= 6; 
    if (!$shift) 
    { 
      $enc .= chr($table[$word]); 
      $word >>= 6; 
    } 
  } 
  if ($shift) 
    $enc .= chr($table[$word]); 

  // Decode sequence 
  $tbl = array_fill($i_min, $i_max - $i_min + 1, 0); 
  while (list($k,$v) = each($table)) 
    $tbl[$v] = $k; 
  $tbl = implode(",", $tbl); 
   
  $fi = ",p=0,s=0,w=0,t=Array({$tbl})"; 
  $f  = "w|=(t[x.charCodeAt(p++)-{$i_min}])<<s;"; 
  $f .= "if(s){r+=String.fromCharCode({$xor}^w&255);w>>=8;s-=2}else{s=6}"; 
   
  // Generate page 
  $r = "<script language=JavaScript>"; 
  $r.= "function decrypt_p(x){";
  $r.= "var l=x.length,b=1024,i,j,r{$fi};"; 
  $r.= "for(j=Math.ceil(l/b);j>0;j--){r='';for(i=Math.min(l,b);i>0;i--,l--){{$f}}document.write(r)}"; 
  $r.= "}decrypt_p(\"{$enc}\")"; 
  $r.= "</script>"; 
  return $r; 
} 
ob_start("_fwk_filter_encrypt"); 

?>
something else Fellow · 2,296 posts #8

You Can Stop Online Source Viewers From Viewing/Copying Your Content./People ripping your site as there own. $something = $_SERVER['HTTP_REFERER']; if((substr_count($something,"yoursite.com")<1)&&(substr_count($something,"google")<1)){ header("Location: ".http://yoursite.com/haha.php%29; exit(); }else{ //////////normal header content here }

Alternativly you could use mod rewrite but remember to condition search engines from your rewrite rule 🙂

anderson Developer · 146 posts #9

what u meant my $something? @ something else

Wait...

anderson Developer · 146 posts #10

min0taur's WAP site is protected from viewing code n sesion id. do u know how e do that?

Wait...

something else Fellow · 2,296 posts #11

anderson wrote: what u meant my $something? @ something else

$something was just a random string name to which the refferer is attached to. it could have been $ref = $_SERVER['HTTP_REFERER']; or anything you want it to be

something else Fellow · 2,296 posts #12

anderson wrote: min0taur's WAP site is protected from viewing code n sesion id. do u know how e do that?

I can see it with my source viewer? He is using modrewrite so i imagine you are trying to view it with an online source viewer which is obviously blocked 🙂 As for session id he is using cookies

anderson Developer · 146 posts #13

It's useful. thanks for the ideas.

Wait...

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close