From 490d36e65ac24e34e3021c2a0947384aee138c88 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Wed, 13 Apr 2016 21:05:14 -0400 Subject: Root commit for new Compass repository This is the Alpha version of ComPASS, originally developed sometime in 2014. --- Options.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Options.h (limited to 'Options.h') 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 +#include +#include +#include +#include +#include + +#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 loadOptionsFile(int start, int argc, char* argv[]); +}; + +#endif // OPTIONS_H -- cgit v1.2.3