{"id":22,"date":"2007-11-04T00:19:53","date_gmt":"2007-11-03T22:19:53","guid":{"rendered":"http:\/\/www.crydust.be\/blog\/2007\/11\/04\/filezilla-decrypt\/"},"modified":"2007-11-04T00:19:53","modified_gmt":"2007-11-03T22:19:53","slug":"filezilla-decrypt","status":"publish","type":"post","link":"http:\/\/www.crydust.be\/blog\/2007\/11\/04\/filezilla-decrypt\/","title":{"rendered":"FileZilla decrypt"},"content":{"rendered":"<p>Every now and then I get someone asking me for an ftp password. Mine have always been stored in FileZilla. I don&#8217;t know them by heart. There is no problem with this except that FileZilla encrypts them. Thank God decrypting FileZilla 2 passwords is easy. Here is some as2 code to accomplish it:<\/p>\n<p><!--more--><\/p>\n<pre class=\"prettyprint\">\r\nfunction decrypt(numeric:String):String {\r\n  var decrypted:String = &quot;&quot;;\r\n  var encrypted:String = &quot;&quot;;\r\n  var secret:String = &quot;FILEZILLA1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;;\r\n  if (numeric.length % 3 == 0) {\r\n    for (var i:Number = 0; i &lt; numeric.length; i += 3) {\r\n      var charCode:Number = parseInt(numeric.substr(i, 3), 10);\r\n      encrypted += String.fromCharCode(charCode);\r\n    }\r\n    for (var i:Number = 0; i &lt; encrypted.length; i++) {\r\n      var secretCharIndex:Number = (encrypted.length + i) % secret.length;\r\n      var numA:Number = encrypted.charCodeAt(i);\r\n      var numB:Number = secret.charCodeAt(secretCharIndex);\r\n      decrypted += String.fromCharCode(numA ^ numB);\r\n    }\r\n  } else {\r\n    decrypted = &quot;ERROR: Length must be multiple of 3.&quot;;\r\n  }\r\n  return decrypted;\r\n}\r\n\r\nfunction encrypt(decrypted:String):String {\r\n  var numeric:String = &quot;&quot;;\r\n  var encrypted:String = &quot;&quot;;\r\n  var secret:String = &quot;FILEZILLA1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;;\r\n  for (var i:Number = 0; i &lt; decrypted.length; i++) {\r\n    var secretCharIndex:Number = (decrypted.length + i) % secret.length;\r\n    var numA:Number = decrypted.charCodeAt(i);\r\n    var numB:Number = secret.charCodeAt(secretCharIndex);\r\n    var charCode:Number = numA ^ numB;\r\n    encrypted += String.fromCharCode(charCode);\r\n    var paddedcharCode:String = charCode.toString(10);\r\n    while (paddedcharCode.length &lt; 3) {\r\n      paddedcharCode = &quot;0&quot; + paddedcharCode;\r\n    }\r\n    numeric += paddedcharCode;\r\n  }\r\n  return numeric;\r\n}\r\n<\/pre>\n<p>And a working example:<\/p>\n<div id=\"decrypt_filezilla_passwords\"><\/div>\n<p><script type=\"text\/javascript\">\nvar so = new SWFObject(\"http:\/\/www.crydust.be\/blog\/wp-content\/uploads\/decrypt_filezilla_passwords.swf\", \"decrypt_filezilla_passwords_swf\", \"290\", \"100\", \"6\", \"#FFFFFF\");\nso.write(\"decrypt_filezilla_passwords\");\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Every now and then I get someone asking me for an ftp password. Mine have always been stored in FileZilla. I don&#8217;t know them by heart. There is no problem with this except that FileZilla encrypts them. Thank God decrypting FileZilla 2 passwords is easy. Here is some as2 code to accomplish it.<\/p>\n<p> <a href=\"http:\/\/www.crydust.be\/blog\/2007\/11\/04\/filezilla-decrypt\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-22","post","type-post","status-publish","format-standard","hentry","category-flash"],"_links":{"self":[{"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/posts\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":0,"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/posts\/22\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/media?parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/categories?post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.crydust.be\/blog\/wp-json\/wp\/v2\/tags?post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}