Decryption ASP source code.

  Chong Chong spirits, from the Internet to download the ASP source code, the time for study and research. 
  An open file, the code as hieroglyphics. Are very depressed it: ( 
  The Internet is to find a declassified, in a document to pay a file open, copy, paste, decryption, and then copy and then paste, then preserved …… 
  If an ASP procedures have hundreds of files?? 

  Solutions to the .. 

  Decode.asp 

  <% @ Language = "JavaScript"%> 
<%

  / * 
  *————— Decode.asp —————– 
  * Functions: Traversing a directory of all documents, the encrypted before. Asp document 
  * Decryption, and into the source file. 
  * Example: single file decryption 
  * Response.Write (DncodeFile (Server.MapPath ( "conn.asp "))); 
  * Example: directory all the documents declassified. 
  * DncodeFolderFiles (Server.MapPath ( "xml")) 
  * Author: wanghr100 (Ash beans baby. Net) 
  * Update :2004-5-17 11:31 
  *————— Decode.asp —————– 
  * / 

  Function DncodeFile (sFilePath) 
  ( 
  / * 
  *————— DncodeFile (sFilePath) —————– 
  * DncodeFile (sFilePath) 
  * Function: Open document sFilePath, Encode decryption, rewrite the document. 
  * Parameters: sFilePath, string, paper path. 
  * Return to: sFilePath, the paper path. 
  * Example: Response.Write (DncodeFile (Server.MapPath ( "conn.asp "))); 
  * Author: wanghr100 (Ash beans baby. Net) 
  * Update :2004-5-17 0:58 
  *————— DncodeFile (sFilePath) —————– 
  * / 
  Var ForReading = 1, ForWriting = 2, ForAppending = 8; 
  Var fso = Server.CreateObject ( "Scripting.FileSystemObject"); 
  Var f = fso.OpenTextFile (sFilePath, ForReading, true); 
  SFileText = f.ReadAll (); 
  F.Close (); 
  SDncodeText = strdec (sFileText) 
  Var f = fso.OpenTextFile (sFilePath, ForWriting, true); 
  F.Write (sDncodeText); 
  F.Close (); 
  / / Return sDncodeText; 
  Return sFilePath; 
  ) 

  Function GetFilesPath (sFolderPath) 
  ( 
  / * 
  *————— GetFilesPath (sFolderPath) —————– 
  * GetFilesPath (sFolderPath) 
  * Functions: sFolderPath directory traversal of all documents. Return arrays. Document storage path. 
  * Parameters: sFolderPath, string, directory absolute path. 
  * Example: Response.Write (GetFilesPath (Server.MapPath ( "xml"))) 
  * Update :2004-5-12 8:33 
  * Author: wanghr100 (Ash beans baby. Net) 
  *————— GetFilesPath (sFolderPath) —————– 
  * / 
  Var sFilePath = new Array (); 
  Var fso = Server.CreateObject ( "Scripting.FileSystemObject"); 
  Var oFolder = fso.GetFolder (sFolderPath); 
  Var oSubFolders = oFolder.SubFolders; 
  Var oFiles = oFolder.Files; 
  Icount = oFiles.Count; 

  Var enmFiles = new Enumerator (oFiles); 
  For (;! EnmFiles.atEnd (); enmFiles.moveNext ()) 
  ( 
  SFilePath enmFiles.item [sFilePath.length] = (). Path 
  ) 

  Var enmFolders = new Enumerator (oSubFolders); 
  For (;! EnmFolders.atEnd (); enmFolders.moveNext ()) 
  ( 
  / * Old became multidimensional array * / 
  / / SFilePath [sFilePath.length] = GetFilesPath (enmFolders.item (). Path); 
  / * Add 2004-5-17 11:09 only to one-dimensional array * / 
  SFilePath = sFilePath.concat (GetFilesPath (enmFolders.item (). Path)); 
  ) 

  Return sFilePath; 

  ) 

  Function GetFileType (sFileName) 
  ( 
  / * 
  *————— GetFileType (sFileName) —————– 
  * GetFileType (sFileName) 
  * Function: suffix, the sFileName file types. 
  * Parameters: sFileName, strings, file names. 
  * Example: Response.Write (GetFileType ( "decode.asp")) 
  * Update :2004-5-13 8:33 
  * Author: wanghr100 (Ash beans baby. Net) 
  *————— GetFileType (sFileName) —————– 
  * / 
  SFileName = String (sFileName); 
  Return sFileName.split (".")[ sFileName.split ("."). length-1]; 
  ) 

  / * Start declassified achieved: Lee brilliant Start * / 
  Function screncode (s, l) 
  (Enc = new ActiveXObject ( "Scripting.Encoder"); 
  Return enc.EncodeScriptFile ("."+ l, s, 0, l + "cript"); 
  ) 


  Var STATE_COPY_INPUT = 100 
  Var STATE_READLEN = 101 
  Var STATE_DECODE = 102 
  Var STATE_UNESCAPE = 103 

  Var pick_encoding = new Array ( 
  1, 2, 0, 1, 2, 0, 2, 0, 0, 2, 0, 2, 1, 0, 2, 0, 
  1, 0, 2, 0, 1, 1, 2, 0, 0, 2, 1, 0, 2, 0, 0, 2, 
  1, 1, 0, 2, 0, 2, 0, 1, 0, 1, 1, 2, 0, 1, 0, 2, 
  1, 0, 2, 0, 1, 1, 2, 0, 0, 1, 1, 2, 0, 1, 0, 2 
)

  Var rawData = new Array ( 
  0×64, 0×37, 0×69, 0×50, 0×7E, 0×2C, 0×22, 0×5A, 0×65, 0×4A, 0×45, 0×72, 
  0×61, 0×3A, 0×5B, 0×5E, 0×79, 0×66, 0×5D, 0×59, 0×75, 0×5B, 0×27, 0×4C, 
  0×42, 0×76, 0×45, 0×60, 0×63, 0×76, 0×23, 0×62, 0×2A, 0×65, 0×4D, 0×43, 
  0×5F, 0×51, 0×33, 0×7E, 0×53, 0×42, 0×4F, 0×52, 0×20, 0×52, 0×20, 0×63, 
  0×7A, 0×26, 0×4A, 0×21, 0×54, 0×5A, 0×46, 0×71, 0×38, 0×20, 0×2B, 0×79, 
  0×26, 0×66, 0×32, 0×63, 0×2A, 0×57, 0×2A, 0×58, 0×6C, 0×76, 0×7F, 0×2B, 
  0×47, 0×7B, 0×46, 0×25, 0×30, 0×52, 0×2C, 0×31, 0×4F, 0×29, 0×6C, 0×3D, 
  0×69, 0×49, 0×70, 0×3F, 0×3F, 0×3F, 0×27, 0×78, 0×7B, 0×3F, 0×3F, 0×3F, 
  0×67, 0×5F, 0×51, 0×3F, 0×3F, 0×3F, 0×62, 0×29, 0×7A, 0×41, 0×24, 0×7E, 
  0×5A, 0×2F, 0×3B, 0×66, 0×39, 0×47, 0×32, 0×33, 0×41, 0×73, 0×6F, 0×77, 
  0×4D, 0×21, 0×56, 0×43, 0×75, 0×5F, 0×71, 0×28, 0×26, 0×39, 0×42, 0×78, 
  0×7C, 0×46, 0×6E, 0×53, 0×4A, 0×64, 0×48, 0×5C, 0×74, 0×31, 0×48, 0×67, 
  0×72, 0×36, 0×7D, 0×6E, 0×4B, 0×68, 0×70, 0×7D, 0×35, 0×49, 0×5D, 0×22, 
  0×3F, 0×6A, 0×55, 0×4B, 0×50, 0×3A, 0×6A, 0×69, 0×60, 0×2E, 0×23, 0×6A, 
  0×7F, 0×09, 0×71, 0×28, 0×70, 0×6F, 0×35, 0×65, 0×49, 0×7D, 0×74, 0×5C, 
  0×24, 0×2C, 0×5D, 0×2D, 0×77, 0×27, 0×54, 0×44, 0×59, 0×37, 0×3F, 0×25, 
  0×7B, 0×6D, 0×7C, 0×3D, 0×7C, 0×23, 0×6C, 0×43, 0×6D, 0×34, 0×38, 0×28, 
  0×6D, 0×5E, 0×31, 0×4E, 0×5B, 0×39, 0×2B, 0×6E, 0×7F, 0×30, 0×57, 0×36, 
  0×6F, 0×4C, 0×54, 0×74, 0×34, 0×34, 0×6B, 0×72, 0×62, 0×4C, 0×25, 0×4E, 
  0×33, 0×56, 0×30, 0×56, 0×73, 0×5E, 0×3A, 0×68, 0×73, 0×78, 0×55, 0×09, 
  0×57, 0×47, 0×4B, 0×77, 0×32, 0×61, 0×3B, 0×35, 0×24, 0×44, 0×2E, 0×4D, 
  0×2F, 0×64, 0×6B, 0×59, 0×4F, 0×44, 0×45, 0×3B, 0×21, 0×5C, 0×2D, 0×37, 
  0×68, 0×41, 0×53, 0×36, 0×61, 0×58, 0×58, 0×7A, 0×48, 0×79, 0×22, 0×2E, 
  0×09, 0×60, 0×50, 0×75, 0×6B, 0×2D, 0×38, 0×4E, 0×29, 0×55, 0×3D, 0×3F 
)

  Var transformed = new Array () 
  For (var i = 0; i <3; i + +) transformed [i] = new Array () 
  For (var i = 31; i <= 126; i + +) for (var j = 0; j <3; j + +) transformed [j] [rawData [(i-31) * 3 + j] = (i == 31)? 9: i 

  Var digits = new Array () 
  For (var i = 0; i <26; i + +) 
  ( 
  Digits [ "A." CharCodeAt (0) + i] = i 
  Digits [ "a." CharCodeAt (0) + i] = i +26 
  ) 
  For (var i = 0; i <10; i + +) digits [ "0." CharCodeAt (0) + i] = i +52 
  Digits [0×2b] = 62 
  Digits [0×2f] = 63 

  Function unescape (char) 
  ( 
  Var escapes = "#&!*$" 
  Var escaped = "\ r \ n <> @" 

  If (char.charCodeAt (0)> 126) return char 
  If (escapes.indexOf (char)! = -1) Return escaped.substr (escapes.indexOf (char), 1) 
  Return "?" 
  ) 

  Function decodeBase64 (string) 
  ( 
  Var val = 0 
  Val = + (digits [string.substr (0,1). CharCodeAt (0)] <<2) 
  Val = + (digits [string.substr (1,1). CharCodeAt (0)]>> 4) 
  Val = + (digits [string.substr (1,1). CharCodeAt (0)] & 0xf) <<12 
  Val + = ((digits [string.substr (2,1). CharCodeAt (0)]>> 2) <<8) 
  Val + = ((digits [string.substr (2,1). CharCodeAt (0)] & 0×3) <<22) 
  Val = + (digits [string.substr (3,1). CharCodeAt (0)] <<16) 
  Return val 
  ) 

  Function strdec (encodingString) 
  ( 

  Var marker = "#@~^" 
  Var stringIndex = 0 
  Var scriptIndex = -1 
  Var unEncodingIndex = 0 
  Var char = null 
  Var encodingLength unEncodinglength = 0 = 
  Var state = STATE_COPY_INPUT 
  Var unEncodingString = "" 
  Var re, arr 

  While (state) 
  ( 
  Switch (state) 
  ( 
  Case (STATE_COPY_INPUT): 
  ScriptIndex = encodingString.indexOf (marker, stringIndex) 
  If (scriptIndex! = -1) 
  ( 
  UnEncodingString + = encodingString.substring (stringIndex, scriptIndex) 
  ScriptIndex + = marker.length 
  State = STATE_READLEN 
  ) 
  Else 
  ( 
  StringIndex stringIndex = == 0? 0: stringIndex 
  UnEncodingString + = encodingString.substr (stringIndex, encodingString.length) 
  State = 0 
  ) 
  Break 

  Case (STATE_READLEN): 
  EncodingLength = encodingString.substr (scriptIndex, 6) 
  UnEncodinglength = decodeBase64 (encodingLength) 
  ScriptIndex + = (6 + "==". length) 
  State = STATE_DECODE 
  Break 

  Case (STATE_DECODE): 
  If (! UnEncodinglength) 
  ( 
  StringIndex scriptIndex + = "DQgAAA ==^#~@". length 
  UnEncodingIndex = 0 
  State = STATE_COPY_INPUT 
  Break 
  ) 
  Char = encodingString.substr (scriptIndex, 1) 
  If (char == "@") state = STATE_UNESCAPE 
  Else 
  ( 
  If (char.charCodeAt (0) <0xFF) 
  ( 
  UnEncodingString + = String.fromCharCode (transformed [pick_encoding [unEncodingIndex% 64] [char.charCodeAt (0)]) 
  UnEncodingIndex + + 
  ) 
  Else 
  ( 
  UnEncodingString + = char 
  ) 
  ScriptIndex + + 
  UnEncodinglength – 
  Break 
  ) 

  Case STATE_UNESCAPE: 
  UnEncodingString + = unescape (encodingString.substr (+ + scriptIndex, 1)) 
  ScriptIndex + +; unEncodinglength -= 2 
  UnEncodingIndex + + 
  State = STATE_DECODE 
  Break 
  ) 
  ) 

  Re = new RegExp ( "(JScript | VBscript). Encode" and "gmi") 
  While (arr = re.exec (unEncodingString)) unEncodingString RegExp.leftContext + = RegExp. RegExp.rightContext $ 1 + 
  Return unEncodingString 
  ) 

  / * End declassified achieved: Lee brilliant End * / 


  Function DncodeFolderFiles (sFolderPath) 
  ( 
  / * 
  *————— DncodeFolderFiles (sFolderPath) —————– 
  * DncodeFolderFiles (sFolderPath) 
  * Functions: sFolderPath directory traversal of all documents, the encrypted. Asp document 
  * Decryption, and into the source file. 
  * Example: DncodeFolderFiles (Server.MapPath ( "xml")); 
  * Author: wanghr100 (Ash beans baby. Net) 
  * Update :2004-5-17 8:07 
  *————— DncodeFolderFiles (sFolderPath) —————– 
  * / 
  Var arrFiles = GetFilesPath (sFolderPath) 
  For (var i = 0; i <arrFiles.length; i + +) 
  ( 
  If (GetFileType (arrFiles [i ])==" asp ") 
  ( 
  Response.Write (DncodeFile (arrFiles [i])) 
  Response.Write ( "OK. <br>") 
  ) 
  ) 
  ) 

  / / Xml directory obtain all documents declassified. 
  DncodeFolderFiles (Server.MapPath ( "xml")) 
  / / Gets t.asp. Declassified. 
  Response.Write (DncodeFile (Server.MapPath ( "t.asp"))) 
%>

Bookmark it: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Google
  • DotNetKicks
  • DZone
  • Furl
  • Netvouz

Tags: , , ,

Releated Articles


0 Comments to “Decryption ASP source code.”

No Comments. Send your comment.

Leave a Reply

You must be logged in to post a comment.