diff options
author | Malf Furious <m@lfurio.us> | 2016-04-13 21:05:14 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2016-04-13 21:05:14 -0400 |
commit | 490d36e65ac24e34e3021c2a0947384aee138c88 (patch) | |
tree | 418a229fa60708d7796bc61f90794626aefed9d5 /Options.h | |
download | compass-490d36e65ac24e34e3021c2a0947384aee138c88.tar.gz compass-490d36e65ac24e34e3021c2a0947384aee138c88.zip |
Root commit for new Compass repository
This is the Alpha version of ComPASS, originally developed sometime in
2014.
Diffstat (limited to 'Options.h')
-rw-r--r-- | Options.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Options.h b/Options.h new file mode 100644 index 0000000..a813fa4 --- /dev/null +++ b/Options.h @@ -0,0 +1,42 @@ +#ifndef OPTIONS_H
+#define OPTIONS_H
+
+#include <iostream>
+#include <string>
+#include <sstream>
+#include <fstream>
+#include <vector>
+#include <unistd.h>
+
+#include "Cryptor.h"
+
+#define OPTIONS_FILE ".compassoptions"
+
+class Options {
+public:
+ Options();
+ virtual ~Options();
+
+ PasswordSpec getPasswordSpec();
+ void checkString(std::string str);
+ void parseArgv(int start, int argc, char* argv[]);
+
+ // Options
+ std::string user;
+ std::string pass;
+ std::string rh; // remote host
+ std::string pt; // TCP port
+ std::string dr; // directory
+ int cn; // credential number
+ int ml; // max length
+ bool ns; // no special chars
+ bool nc; // no caps
+ bool nn; // no numeric chars
+ bool pp; // print password (don't use clipboard)
+ bool cc; // preserve clipboard (don't clean)
+
+private:
+ std::vector<std::string> loadOptionsFile(int start, int argc, char* argv[]);
+};
+
+#endif // OPTIONS_H
|