git-svn-id: svn://db.shs.com.ru/pip@916 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
8
utils/cloud_dispatcher/CMakeLists.txt
Normal file
8
utils/cloud_dispatcher/CMakeLists.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
message(STATUS "Building picloud")
|
||||||
|
add_executable(picloud "main.cpp")
|
||||||
|
target_link_libraries(picloud pip pip_cloud)
|
||||||
|
if (DEFINED LIB)
|
||||||
|
install(TARGETS picloud DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
|
else()
|
||||||
|
install(TARGETS picloud DESTINATION bin)
|
||||||
|
endif()
|
||||||
42
utils/cloud_dispatcher/main.cpp
Normal file
42
utils/cloud_dispatcher/main.cpp
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
#include "pip.h"
|
||||||
|
#include "picrypt.h"
|
||||||
|
|
||||||
|
using namespace PICoutManipulators;
|
||||||
|
|
||||||
|
|
||||||
|
void usage() {
|
||||||
|
piCout << Bold << "PIP Cloud dispatcher";
|
||||||
|
piCout << Cyan << "Version" << Bold << PIPVersion() << NewLine;
|
||||||
|
piCout << Green << Bold << "Usage:" << Default << "\"picloud\"" << NewLine;
|
||||||
|
piCout << Green << Bold << "Details:";
|
||||||
|
piCout << "-h --help " << Green << "- display this message and exit";
|
||||||
|
//piCout << "-g --genhash " << Green << "- generate hash from <pass> string";
|
||||||
|
//piCout << "-t --text " << Green << "- output in text base64";
|
||||||
|
//piCout << "-o --out <out_file> " << Green << "- write out to file <out_file>";
|
||||||
|
//piCout << "-c --crypt <file> " << Green << "- crypt file <file> using secret <pass> or <hash> or <key_file>";
|
||||||
|
//piCout << "-d --decrypt <file> " << Green << "- decrypt file <file> using secret <pass> or <hash> or <key_file>";
|
||||||
|
//piCout << "-p --pass <pass> " << Green << "- use secret from passphrase <pass>";
|
||||||
|
//piCout << "-s --secret <hash> " << Green << "- use secret from hash <hash>";
|
||||||
|
//piCout << "-k --key <key_file> " << Green << "- use secret from binary key_file <key_file>";
|
||||||
|
//piCout << "-x --hex [<hex_key>] " << Green << "- use secret from hex hash <hex_key> or output in text hex";
|
||||||
|
//piCout << "-r --random " << Green << "- generate random secret key";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int main (int argc, char * argv[]) {
|
||||||
|
PICrypt::hash("");
|
||||||
|
PICLI cli(argc, argv);
|
||||||
|
cli.addArgument("genhash", true);
|
||||||
|
|
||||||
|
if (!(cli.hasArgument("genhash") ||
|
||||||
|
cli.hasArgument("crypt") ||
|
||||||
|
cli.hasArgument("decrypt") ||
|
||||||
|
cli.hasArgument("random")) ||
|
||||||
|
cli.hasArgument("help")) {
|
||||||
|
usage();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user