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

Looking at source code

Discussion in 'BlackHat Lounge' started by Billw, Jul 31, 2008.

  1. Billw

    Billw Junior Member

    Joined:
    Jan 28, 2008
    Messages:
    181
    Likes Received:
    191
    I have been on sites before where you can't see their source code. Anyone know how they do that. It would be a great way to hide your cookie code.
     
  2. theadultsplayground

    theadultsplayground BANNED BANNED

    Joined:
    Jan 24, 2008
    Messages:
    1,202
    Likes Received:
    336
    Umm, How about PHP
     
  3. Billw

    Billw Junior Member

    Joined:
    Jan 28, 2008
    Messages:
    181
    Likes Received:
    191
    I'm not a programmer so don't know about this. Thanks though for the reply, maybe there is a code that can be installed on the site to block prying eyes :D
     
  4. theadultsplayground

    theadultsplayground BANNED BANNED

    Joined:
    Jan 24, 2008
    Messages:
    1,202
    Likes Received:
    336
    Didnt mean to be blunt but you cant view the source code for PHP.
     
  5. Orebil

    Orebil Registered Member

    Joined:
    Jul 13, 2008
    Messages:
    66
    Likes Received:
    13
    Occupation:
    Web Developer
    Location:
    USA
    Huh? There's no such thing as a website that blocks you from viewing the HTML code. It's impossible. They can use javascript to intercept right clicks but just use the View menu to view source.
     
  6. steves

    steves Regular Member

    Joined:
    Jun 6, 2007
    Messages:
    221
    Likes Received:
    61
    Go back to the site and see if you can just scroll down some. I know some people leave a lot of empty space towards the top of the source code, thus making people think it is not there. However by simply scrolling down, you will eventually see it.
     
  7. mtnman_sierras

    mtnman_sierras Newbie

    Joined:
    Jan 20, 2008
    Messages:
    30
    Likes Received:
    24
    Maybe you're landing on a cloaked page. Perhaps if you could emulate a google bot and revisit the url, you could see the actual page and it's source code.
     
  8. aftershock2020

    aftershock2020 Senior Member

    Joined:
    Oct 19, 2007
    Messages:
    981
    Likes Received:
    477
    Actually, php does conseal the code, even from viewsource, as " view source " only allows for true html to be displayed. To kill the arguement of " why does it show javascript tags if that's the case ? "...Simply due to the script you are looking at being an " HTML recognition tag ", to relay and function from the true javascript that is actually in the .js code document on the server through the html on the page you are sourcing. Also, even though a site may be saved as a .php file, the search engine is only reading the standard html code within that page. Otherwise, it is being recognized and passed on and in fact, overlooked all together.

    All you see in a " view source " is true html. If you want to hide your cookie scripts, I agree with using php or better yet, plain javascript, neither of which a browser can read.

    Think of it in terms of a web editor. If you have one that is basic, you can only read HTML but if you have an advanced, apache based, multiple code language enabled program such as D*reamWe*aver, you can read html, java, php, perl, etc.

    Common unknown tip: Search engine bots, spiders and even the new " censorship" scripts they are beta testing can NOT read anything other than HTML. It recognizes and skips javascript, php and pretty much any other langauge there is, passing it as " programming code. " This is why if you program in php or javascript, the engines can't read your code, which is also why so many of the internet marketing gurus got into it in the first place.

    It wasn't about getting faster loading pages and repeating graphics. It was to cover and cover up page rotators, cookies and other things that simply are busted and counted out when used in simple html, which is obviously your issue here.

    Hope this helps.
     
    Last edited: Jul 31, 2008
  9. Orebil

    Orebil Registered Member

    Joined:
    Jul 13, 2008
    Messages:
    66
    Likes Received:
    13
    Occupation:
    Web Developer
    Location:
    USA
    Wrong. JS is a client side script. The browser HAS to read it in order to execute it.

    What??? Apache based? Apache is a web server and has nothing to do with editing text files. You can use any text editor to view and edit source code. I strongly recommend Notepad++. DW sucks monkey balls. That doesn't mean you can download scripts from a website. Server side scripts, like PHP, are executed and then the output is sent to the user.
     
  10. h1dd3n

    h1dd3n Regular Member

    Joined:
    Jan 6, 2008
    Messages:
    232
    Likes Received:
    21
    browsers/crawlers/bots/etc cant read actual php since its executed on the server and not in the browser, if you have html tags in php then those will show up.
     
  11. Billw

    Billw Junior Member

    Joined:
    Jan 28, 2008
    Messages:
    181
    Likes Received:
    191
    Thanks for the great answers, I learn new stuff everyday from you guys and I appreciate your time in answering.
     
  12. aftershock2020

    aftershock2020 Senior Member

    Joined:
    Oct 19, 2007
    Messages:
    981
    Likes Received:
    477
    First, personal attacks on people are what sucks.

    Second, .js is server side but what you are seeing in the view source is in fact the HTML tags to call on the script from the .js files, not the actual code, which if you code the cookie to pass through javascript, you can cover where the cookie is actually coming from in that access point.

    Nuff said.
     
  13. Maxell

    Maxell Regular Member

    Joined:
    May 10, 2007
    Messages:
    456
    Likes Received:
    563
    if by "souce code" you mean the HTML code ? then as said its impossible to hide your code, becuase one can easily get it eventough if you deocde or whatever you do. If by "source code" you mean the PHP, ASP or any other code, you can NEVER see this, becuase after executing code these languages alwasy generate HTML that is visible in the browser..
     
  14. aftershock2020

    aftershock2020 Senior Member

    Joined:
    Oct 19, 2007
    Messages:
    981
    Likes Received:
    477
    Exactly...well said.