1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Block Source Code

Discussion in 'BlackHat Lounge' started by black1411, Jun 20, 2009.

  1. black1411

    black1411 Junior Member

    Joined:
    Dec 14, 2008
    Messages:
    158
    Likes Received:
    65
    Is there a method to prevent visitors from checking/seeing your original html "Page Source" without messing up your web page? I heard some encryption tools could maybe do it, any of u managed to done it before ? :)
     
  2. TermsB

    TermsB Senior Member

    Joined:
    May 19, 2009
    Messages:
    1,076
    Likes Received:
    734
    Location:
    USA
    Blocking your source would raise MAJOR red flags to anyone that was reviewing your page.
     
  3. The Scarlet Pimp

    The Scarlet Pimp Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 2, 2008
    Messages:
    787
    Likes Received:
    3,120
    Occupation:
    Chair moistener.
    Location:
    Cyberspace
    it depends on how badly someone wants to see it. most codes can be cracked ...
     
  4. blackhatjamie

    blackhatjamie BANNED BANNED

    Joined:
    Sep 11, 2007
    Messages:
    341
    Likes Received:
    276
    This might harm your rankings of your website. What you might want to look at doing is encrypting your source code, that way if one does look at it, it will all be encrypted.
     
  5. djedje70

    djedje70 Regular Member

    Joined:
    Feb 5, 2008
    Messages:
    239
    Likes Received:
    252
    Location:
    none of ur fr#$%ing biz dude!!!
    Or just redo everything in php or asp.
     
  6. gimme4free

    gimme4free Executive VIP Jr. VIP Premium Member

    Joined:
    Oct 22, 2008
    Messages:
    1,879
    Likes Received:
    1,931
    Add your code into an iframe. Make the file PHP, disallow direct access to the file. Only allow access to the file if the referrer is the page you are referring visitors to. This will block the user unless they use refspoof but I doubt that they would go that far.
     
    • Thanks Thanks x 1
  7. stealthisblog

    stealthisblog Regular Member

    Joined:
    May 26, 2008
    Messages:
    289
    Likes Received:
    238
    Location:
    New York City
    That would be suicide for SEO. Google will find the link and go to it with a blank referer and see nothing. Source code is ALWAYS available to people if its html/js/css, so deal with it.
     
  8. stealthisblog

    stealthisblog Regular Member

    Joined:
    May 26, 2008
    Messages:
    289
    Likes Received:
    238
    Location:
    New York City
    That, too, will kill your SEO. Google wont understand the encryption.
     
  9. amber0855

    amber0855 Junior Member

    Joined:
    Feb 4, 2009
    Messages:
    196
    Likes Received:
    102
    You can use voormedia.com/en/tools

    There are a variety of html and JS encryption tools there.

    I would just take the part that you don't want them to see and encrypt it. Leave the rest normal. It still might hurt your seo though and it is only semi-secure. This method will stop 95% of the people that think they know what they are doing though.

    The other 5% are the motherfuckers

    Gimme4free's solution is the best posted here, but would suck for seo
     
  10. Whisker

    Whisker Moderator Staff Member Moderator Premium Member

    Joined:
    Dec 26, 2007
    Messages:
    994
    Likes Received:
    1,322
    Seo is not as important to some people as hiding the source in many cases so remember that before you think seo is everything. A lot of promotion does not require you to have seo friendly pages, nor would you even want your pages to get indexed for a lot of good reasons(use norobots.txt)

    To encrypt the code you can obfuscate the html, to hide by server side code(php) or smash everything down to the 4th power.

    Here is a simple html obfuscator
    http://www.voormedia.com/en/tools/html-obfuscate-scrambler.php
     
  11. zorba

    zorba Newbie

    Joined:
    Jun 18, 2009
    Messages:
    16
    Likes Received:
    22
    Basically, no, you can't. At least, not without consequences you don't want.

    You can use obfuscation tools to replace the page code with incomprehensible JavaScript that outputs the page code. You can also do stupid referrer tricks. But either has the following effects:

    1.) The site becomes outright invisible to search engines -- you will totally drop from every search engine result page. So if rely on search traffic at all, it'll totally dry up instantly.

    2.) People with unusual browsers, mobile devices, or JavaScript disabled won't be able to view your page, so you'll lose some customers, and their money.

    3.) The obfuscation will keep totally non-technical people from reading your code. But hell, they probably wouldn't understand the code anyway. Meanwhile, your obfuscation will keep someone like me busy for about 15 minutes (for a complex JS encryption system) or 15 seconds (for stupid referrer tricks or a crappy JS encryption system that just base64s the code and echoes it out) before I get the code anyway.
     
  12. amber0855

    amber0855 Junior Member

    Joined:
    Feb 4, 2009
    Messages:
    196
    Likes Received:
    102
    Zorba... JS obfuscation does not always destroy your seo

    Google "xrumer service" without the quotes and view page source on the top ranking site
     
  13. Belexandor

    Belexandor Junior Member

    Joined:
    May 4, 2008
    Messages:
    196
    Likes Received:
    193
    Occupation:
    Chairman for the non-profit organization to help h
    Location:
    BHW.
    It would be quite useful to be able to hide some of the things in your(my) source code from nosy AMs. I've been looking for a way to do it with joomla but haven't found it yet.

    Alas, for the moment I just have to stick that bit of .js in betwixt some tracking code and hope that they never look.
     
  14. zorba

    zorba Newbie

    Joined:
    Jun 18, 2009
    Messages:
    16
    Likes Received:
    22
    Not bad, amber0855 -- you're right, it's a fully obfuscated site at the top of the rankings for its keywords. It's sitting there based purely on the keyword value of the domain itself, plus backlinks (it's the only actively-SEO'd site for those keywords -- 371 backlinks, while all the other sites on page 1 have 0-2.) So I guess it would be more correct to say that JS obfuscation totally eliminates any on-page SEO, which normally counts for quite a lot. However, if your site has basically no competition (well, no intelligent competition -- nobody doing active SEO), then yeah, an obfuscated page can rank.

    On the other hand, time from when I loaded that "obfuscated" page to when I was looking at the source: 43 seconds. Yes, I looked at the clock.
     
    • Thanks Thanks x 1
  15. black1411

    black1411 Junior Member

    Joined:
    Dec 14, 2008
    Messages:
    158
    Likes Received:
    65
    Yes, indeed i should , i'll try to disclose a little detail that i can. the reason i want to do it is actually to hide links. I'm not concerned if somebody want to "clone" my stuff, i just want to hide the links that come out of my scripts. Of course if i could do it without damaging SEO, it would be ideal.

    If you(anybody) could give some advice about this, would like a PM from you so i can disclose more details privately. So yea, to be more specific, it's for hiding specific links generated by scripts when somebody views the page source, not the entire page source. Maybe this will be more doable?
     
    Last edited: Jun 20, 2009
  16. zorba

    zorba Newbie

    Joined:
    Jun 18, 2009
    Messages:
    16
    Likes Received:
    22
    Oh, you just want to hide the links? That's much easier.

    Say you want to link to hxxp://sneakyaffiliatelink.com from your site, hxxp://myblackhatsite.com. First, create a folder on your site called something (like, say, /links). In there, create a PHP file with an ambiguous or innocuous name that contains this:

    <?php
    header('location: hxxp://sneakyaffiliatelink.com');
    ?>

    Say we call this /links/1.php. Now add a robots.txt in the root of your site that contains the following:

    user-agent: *
    disallow: /links/

    And finally, on your page, instead of making links to hxxp://sneakyaffiliatelink.com (the link you wanted to hide), you instead make links to hxxp://myblackhatsite.com/links/1.php. Presto, your links are hidden -- they look like links to your own site. As an added bonus, they are invisible to Google and other spiders (if this is undesirable -- you want Google to see them -- skip the robots.txt step. That step's only there to hide your links from spiders.)

    Of course, someone determined can still see the links by just clicking them and spying on the HTTP session with an HTTP debugger, so once again, this keeps non-technical people out but someone skilled will see through it in seconds. However, this is true of all obfuscation methods -- after all, for the link to work, the user's browser has to see it, and a skilled user can make his browser do anything he wants.
     
  17. black1411

    black1411 Junior Member

    Joined:
    Dec 14, 2008
    Messages:
    158
    Likes Received:
    65
    hey guys, thanks for the replies, i hope this thread shed some light for those that are looking to do the same thing, i'm sure this thread could be useful for people doing BH affiltate/cpa stuff.

    Anyway, i pmed some of u guys, as i need to discuss specifically what i am trying to do privately, so check ur pm if u could advice my specific angle on this. Thanks again everyone who give their replies to shed some light on this.