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

How can you view a php file that redirects?

Discussion in 'BlackHat Lounge' started by rap8557, Mar 18, 2011.

  1. rap8557

    rap8557 Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 15, 2008
    Messages:
    1,080
    Likes Received:
    436
    I found a nice script but i cannot view the source code because it redirects you instantly!

    How can i view them before it redirects? I tried the tools online when i searched google but it displayed the wrong code. I tried to view my DMR code on this site
    iwebtool.com but it displayed the wrong code! Instead of these codes

    Code:
    <html>
    <head>
    <style type="text/css">
    
    #conash3D0 {height:0px; top:-1px;}
    
    </style>
    
    </head>
       <?php
    $referer = $_SERVER['HTTP_REFERER'];
    if($referer == "")
        {
    echo "<meta http-equiv=\"refresh\" content=\"0;url=http://mysite.com
    \">";    
        }
    else
        {
    echo "<meta http-equiv=\"refresh\" content=\"0;url=http://mysite.com
    \">";    
        }
    ?>
    </html> 
    It gives me these

    Code:
    <html>
    <head>
    <style type="text/css">
    
    #conash3D0 {height:0px; top:-1px;}
    
    </style>
    
    </head>
       <meta http-equiv="refresh" content="0;url=http://mysite.com
    "></html> </iframe></noscript></object></layer></span></div></table></body></html><!-- adsok -->
    <script language='javascript' src='https://a12.alphagodaddy.com/hosting_ads/gd01.js'></script>
    
    Who ever can help me i'll tell you what im working on..

    Thanks
     
  2. Dexograph

    Dexograph Newbie

    Joined:
    Jan 4, 2011
    Messages:
    42
    Likes Received:
    15
    PHP is server-side. You never see any PHP code when you check the source code.

    A good thing, too, since PHP powers login pages and such. It wouldn't really make sense if all the PHP code was visible.
     
  3. TapTapper

    TapTapper Junior Member

    Joined:
    Apr 15, 2009
    Messages:
    163
    Likes Received:
    138
    Occupation:
    coder, webstore mangler
    Location:
    US
    Home Page:
    All true. php only serves pages, you can't see the origin.

    If you're desperate, the DownThemAll plugin for Firefox does some amazing stuff. Even if you can't browse to an object having a string in your clipboard and opening various DTA options gives some wild results sometimes. I've grabbed things I didn't know existed by building url snippets from various clues, copying my construct, and opening one of the DTA menu options. Then boom some odd file was in the download box. I can't help you more than that, it's really trial and error