Skip to content
This repository has been archived by the owner on Jan 10, 2021. It is now read-only.

Commit

Permalink
Merge pull request #140 from Macr0Nerd/honey-gui
Browse files Browse the repository at this point in the history
Added cleanup
  • Loading branch information
Gabe Ron committed May 2, 2019
2 parents 423d96b + c81bae4 commit dc36dcd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
2 changes: 2 additions & 0 deletions workshop/HoneyGUI/configDisplay.cpp
Expand Up @@ -42,6 +42,8 @@ int configDisplay::file_replace(std::string toReplace, std::string replaceWith,

filein2.close(); fileout2.close();

system("x=$(find ~/ -name \"honeybot\" | head -n 1); rm $x/honeybot/settings/temp.txt");

return 0;
}

Expand Down
15 changes: 1 addition & 14 deletions workshop/HoneyGUI/pluginDisplay.cpp
Expand Up @@ -51,31 +51,18 @@ pluginDisplay::pluginDisplay() : plugPane(Gtk::ORIENTATION_VERTICAL), plugs(Gtk:
plugins.push_back(strTemp.substr(0, strTemp.length() - 3));
}

infile.close();
infile.open(path + "settings/STD_PLUGINS.conf");

while (getline(infile, strTemp)) { //Reading the standard plugins
stdPlugins.push_back(strTemp);
}

infile.close();

get_list(); //Getting the selected plugins

for (int i = 0; i < plugins.size(); ++i) { //Creating each CheckButton
plugs.pack_start(butts[i]); //Adding it into view

strTemp = "User Plugin";

if (std::find(stdPlugins.begin(), stdPlugins.end(), plugins[i]) != stdPlugins.end()){
strTemp = "Standard Plugin"; //Checking if its a Standard Plugin
}

if (std::find(selected.begin(), selected.end(), plugins[i]) != selected.end()){
butts[i].set_active(true); //If its preselected than activate it
}

butts[i].set_label(plugins[i] + " | " + strTemp); //Setting the label
butts[i].set_label(plugins[i]); //Setting the label
butts[i].signal_toggled().connect( sigc::bind(sigc::mem_fun(*this, &pluginDisplay::alterCheck), butts[i].property_active(), plugins[i]) ); //Connecting the signal
}

Expand Down
1 change: 0 additions & 1 deletion workshop/HoneyGUI/pluginDisplay.h
Expand Up @@ -24,7 +24,6 @@ class pluginDisplay : public Gtk::Frame {
std::string path; //The path to honeybot
std::string checks; //The string to save all the selected plugins to for easy file writing
std::vector<std::string> plugins; //All the available plugins
std::vector<std::string> stdPlugins; //Vector of standard plugins
std::vector<std::string> selected; //Vector of the plugins INITIALLY selected

Gtk::Alignment alignment1;
Expand Down

0 comments on commit dc36dcd

Please sign in to comment.