From f3ec28e559d3bc7a46cefbdfba30c4ac3296d3bc Mon Sep 17 00:00:00 2001 From: x00010 Date: Mon, 26 Apr 2021 20:33:45 +0100 Subject: [PATCH] Change options to resemble dd --- cxor.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cxor.cpp b/cxor.cpp index f5b49e4..ba52e49 100755 --- a/cxor.cpp +++ b/cxor.cpp @@ -16,14 +16,14 @@ void parseargs(int argc, char* argv[]) po::options_description desc("Allowed options"); desc.add_options() ("help", "Print this message") - ("input,i", po::value(), "Specify an input file") + ("if", po::value(), "Specify an input file") ("ih", "Input data is in hex") - ("output,o", "Specify an output file") + ("of", po::value(), "Specify an output file") ("oh", "Output data in hex") ; - po::positional_options_description p; - p.add("input", -1); + /*po::positional_options_description p; + p.add("input", -1);*/ po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); @@ -34,9 +34,9 @@ void parseargs(int argc, char* argv[]) std::cout << desc << std::endl; } - if (vm.count("input")) + if (vm.count("if")) { - std::string file = vm["input"].as(); + std::string file = vm["if"].as(); std::string filecut = file.substr(1, file.length()); std::cout << filecut; } @@ -46,9 +46,9 @@ void parseargs(int argc, char* argv[]) bool bInputHex = true; } - if (vm.count("output")) + if (vm.count("of")) { - std::string file = vm["output"].as(); + std::string file = vm["of"].as(); std::string filecut = file.substr(1, file.length()); std::cout << filecut; }