Advertisement
Guest User

Untitled

a guest
Dec 15th, 2018
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3.     /*
  4.      * Fake 404 by gigajew
  5.      * Version: 2 (firefox edition)
  6.      */
  7.    
  8.    
  9.     $agent;$browser;
  10.    
  11.     // get user agent value
  12.     if (isset($_SERVER['HTTP_USER_AGENT'])) {
  13.     $agent = $_SERVER['HTTP_USER_AGENT'];
  14.     }
  15.    
  16.     // set $browser value if ua == firefox
  17.     if (strlen(strstr($agent, 'Firefox')) > 0) {
  18.         $browser = 'firefox';
  19.     }
  20.    
  21.     // clean the output buffer, and start
  22.     ob_clean();
  23.     ob_start();
  24.    
  25.     // change some headers
  26.     header("Not Found", true, 404);
  27.    
  28.     if ($browser != 'firefox')
  29.         header("Content-Length: 0", true);
  30.    
  31.     // end/flush the output buffer
  32.     ob_end_flush();
  33.    
  34.     // hard exit script if not firefox
  35.     if ($browser != 'firefox') {
  36.         exit;
  37.     }
  38.    
  39. ?>
  40. <html xmlns="http://www.w3.org/1999/xhtml">
  41.   <head>
  42.     <meta http-equiv="Content-Security-Policy" content="default-src chrome:" />
  43.     <title>Server Not Found</title>
  44.     <link rel="stylesheet" href="chrome://browser/skin/aboutNetError.css" type="text/css" media="all" />
  45.     <!-- If the location of the favicon is changed here, the FAVICON_ERRORPAGE_URL symbol in
  46.          toolkit/components/places/src/nsFaviconService.h should be updated. -->
  47.     <link rel="icon" type="image/png" id="favicon" href="chrome://global/skin/icons/warning-16.png" />
  48.   </head>
  49.  
  50.   <body dir="ltr" class="illustrated dnsNotFound neterror">
  51.     <!-- ERROR ITEM CONTAINER (removed during loading to avoid bug 39098) -->
  52.    
  53.  
  54.     <!-- PAGE CONTAINER (for styling purposes only) -->
  55.     <div id="errorPageContainer" class="container">
  56.       <div id="text-container">
  57.         <!-- Error Title -->
  58.         <div class="title">
  59.           <h1 class="title-text">Hmm. We’re having trouble finding that site.</h1>
  60.         </div>
  61.  
  62.         <!-- LONG CONTENT (the section most likely to require scrolling) -->
  63.         <div id="errorLongContent">
  64.  
  65.           <!-- Short Description -->
  66.           <div id="errorShortDesc">
  67.             <p id="errorShortDescText">We can’t connect to the server at <?=$_SERVER['SERVER_NAME']?>.</p>
  68.           </div>
  69.           <p id="badStsCertExplanation" hidden="true">This site uses HTTP
  70. Strict Transport Security (HSTS) to specify that Firefox may only connect
  71. to it securely. As a result, it is not possible to add an exception for this
  72. certificate.</p>
  73.  
  74.           <div id="wrongSystemTimePanel">
  75.             <p> Firefox did not connect to <span id="wrongSystemTime_URL"></span> because your computer’s clock appears to show the wrong time and this is preventing a secure connection.</p> <p>Your computer is set to <span id="wrongSystemTime_systemDate"></span>, when it should be <span id="wrongSystemTime_actualDate"></span>. To fix this problem, change your date and time settings to match the correct time.</p>
  76.           </div>
  77.  
  78.           <div id="wrongSystemTimeWithoutReferencePanel">
  79.             <p>Firefox did not connect to <span id="wrongSystemTimeWithoutReference_URL"></span> because your computer’s clock appears to show the wrong time and this is preventing a secure connection.</p> <p>Your computer is set to <span id="wrongSystemTimeWithoutReference_systemDate"></span>. To fix this problem, change your date and time settings to match the correct time.</p>
  80.           </div>
  81.  
  82.           <!-- Long Description (Note: See netError.dtd for used XHTML tags) -->
  83.           <div id="errorLongDesc">
  84. <strong xmlns="http://www.w3.org/1999/xhtml">If that address is correct, here are three other things you can try:</strong>
  85. <ul xmlns="http://www.w3.org/1999/xhtml">
  86.   <li>Try again later.</li>
  87.   <li>Check your network connection.</li>
  88.   <li>If you are connected but behind a firewall, check that Firefox has permission to access the Web.</li>
  89. </ul>
  90. </div>
  91.  
  92.           <div id="learnMoreContainer">
  93.             <p><a href="https://support.mozilla.org/kb/what-does-your-connection-is-not-secure-mean" id="learnMoreLink" target="new">Learn more…</a></p>
  94.           </div>
  95.         </div>
  96.  
  97.         <!-- UI for option to report certificate errors to Mozilla. Removed on
  98.              init for other error types .-->
  99.         <div id="certificateErrorReporting">
  100.           <p class="toggle-container-with-text">
  101.             <input id="automaticallyReportInFuture" role="checkbox" type="checkbox" />
  102.             <label for="automaticallyReportInFuture" id="automaticallyReportInFuture">Report errors like this to help Mozilla identify and block malicious sites</label>
  103.           </p>
  104.         </div>
  105.  
  106.         <div id="prefChangeContainer" class="button-container">
  107.           <p>It looks like your network security settings might be causing this. Do you want the default settings to be restored?</p>
  108.           <button id="prefResetButton" class="primary" autocomplete="off">Restore default settings</button>
  109.         </div>
  110.  
  111.         <div id="certErrorAndCaptivePortalButtonContainer" class="button-container">
  112.           <button id="returnButton" class="primary" autocomplete="off">Go Back</button>
  113.           <button id="openPortalLoginPageButton" class="primary" autocomplete="off">Open Network Login Page</button>
  114.           <button id="advancedButton" autocomplete="off">Advanced</button>
  115.         </div>
  116.       </div>
  117.  
  118.       <div id="netErrorButtonContainer" class="button-container"><button id="errorTryAgain" class="primary" autocomplete="off" autofocus="true">Try Again</button>
  119.        
  120.       </div>
  121.  
  122.       <div id="advancedPanelContainer">
  123.         <div id="badCertAdvancedPanel" class="advanced-panel">
  124.           <p id="badCertTechnicalInfo"></p>
  125.           <div class="exceptionDialogButtonContainer">
  126.             <button id="exceptionDialogButton">Add Exception…</button>
  127.           </div>
  128.         </div>
  129.  
  130.         <div id="certificateErrorDebugInformation">
  131.           <button id="copyToClipboard">Copy text to clipboard</button>
  132.           <div id="certificateErrorText"></div>
  133.           <button id="copyToClipboard">Copy text to clipboard</button>
  134.         </div>
  135.       </div>
  136.     </div>
  137.   </body>
  138.   <script type="application/javascript" src="chrome://browser/content/aboutNetError.js"></script>
  139. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement