Arguments.h
Go to the documentation of this file.
/*
* steghide 0.5.1 - a steganography program
* Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef SH_ARGUMENTS_H
#define SH_ARGUMENTS_H
#include <string>
#include <vector>
#include "Arg.h"
// to include DEBUG if defined
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
class Arguments {
public:
Arguments (void) {} ;
Arguments (int argc, char *argv[]) ;
void parse (void) ;
bool stdin_isused (void) const ;
ArgCommand Command ;
std::string CommandString ;
ArgString EmbFn ;
ArgString ExtFn ;
ArgString CvrFn ;
ArgString StgFn ;
ArgString Passphrase ;
ArgBool Checksum ;
ArgInt Compression ;
ArgBool EmbedEmbFn ;
ArgEncAlgo EncAlgo ;
ArgEncMode EncMode ;
ArgULong Radius ;
ArgFloat Goal ;
ArgBool Force ;
ArgVerbosity Verbosity ;
ArgDebugCommand DebugCommand ;
ArgBool Check ;
ArgStringList FileList ;
ArgUInt DebugLevel ;
ArgUInt GmlGraphRecDepth ;
ArgUInt GmlStartVertex ;
std::string getPassphrase (bool doublecheck = false) ;
private:
typedef std::vector<std::string>::const_iterator ArgIt ;
static const int NoCompression = 0 ;
static const EncryptionAlgorithm Default_EncAlgo ;
static const EncryptionMode Default_EncMode ;
static const bool Default_Checksum = true ;
static const int Default_Compression = 9 ; // slowest, but smallest
static const bool Default_EmbedEmbFn = true ;
static const bool Default_Force = false ;
static const VERBOSITY Default_Verbosity = NORMAL ;
static const unsigned long Default_Radius = 0 ; // there is no default radius for all file formats
static const unsigned int Max_Algorithm = 3 ;
static float Default_Goal ;
static const DEBUGCOMMAND Default_DebugCommand = NONE ;
static const bool Default_Check = false ;
static const unsigned int Default_DebugLevel = 0 ;
static const unsigned int Default_GmlGraphRecDepth = 0 ;
static const unsigned int Default_GmlStartVertex = 0 ;
void parse_Command (ArgIt& curarg) ;
bool parse_EmbFn (ArgIt& curarg) ;
bool parse_ExtFn (ArgIt& curarg) ;
bool parse_CvrFn (ArgIt& curarg) ;
bool parse_StgFn (ArgIt& curarg) ;
bool parse_Passphrase (ArgIt& curarg) ;
bool parse_Checksum (ArgIt& curarg) ;
bool parse_Compression (ArgIt& curarg) ;
bool parse_EmbedEmbFn (ArgIt& curarg) ;
bool parse_Encryption (ArgIt& curarg) ;
bool parse_Radius (ArgIt& curarg) ;
bool parse_Goal (ArgIt& curarg) ;
bool parse_Force (ArgIt& curarg) ;
bool parse_Verbosity (ArgIt& curarg) ;
bool parse_Debug (ArgIt& curarg) ;
void setDefaults (void) ;
std::vector<std::string> TheArguments ;
} ;
// gcc does not support the export keyword
#include "Arg.cc"
#endif /* ndef SH_ARGUMENTS_H */
Arg.cc
Arg.h
ArgEncAlgo
Arg< EncryptionAlgorithm > ArgEncAlgo
Definition Arg.h:64
ArgBool
Arg< bool > ArgBool
Definition Arg.h:59
ArgUInt
Arg< unsigned int > ArgUInt
Definition Arg.h:66
ArgEncMode
Arg< EncryptionMode > ArgEncMode
Definition Arg.h:65
ArgString
Arg< std::string > ArgString
Definition Arg.h:60
ArgDebugCommand
Arg< DEBUGCOMMAND > ArgDebugCommand
Definition Arg.h:68
DEBUGCOMMAND
DEBUGCOMMAND
Definition Arg.h:55
NONE
@ NONE
Definition Arg.h:55
ArgStringList
Arg< std::list< std::string > > ArgStringList
Definition Arg.h:67
ArgInt
Arg< int > ArgInt
Definition Arg.h:62
ArgULong
Arg< unsigned long > ArgULong
Definition Arg.h:61
VERBOSITY
VERBOSITY
Definition Arg.h:54
NORMAL
@ NORMAL
Definition Arg.h:54
ArgFloat
Arg< float > ArgFloat
Definition Arg.h:63
ArgVerbosity
Arg< VERBOSITY > ArgVerbosity
Definition Arg.h:58
ArgCommand
Arg< COMMAND > ArgCommand
Definition Arg.h:57
Arguments::Default_GmlGraphRecDepth
static const unsigned int Default_GmlGraphRecDepth
Definition Arguments.h:107
Arguments::Default_EmbedEmbFn
static const bool Default_EmbedEmbFn
Definition Arguments.h:98
Arguments::parse_EmbFn
bool parse_EmbFn(ArgIt &curarg)
Definition Arguments.cc:201
Arguments::EmbFn
ArgString EmbFn
the embed file name, "" if stdin
Definition Arguments.h:63
Arguments::parse_Debug
bool parse_Debug(ArgIt &curarg)
Definition Arguments.cc:655
Arguments::parse_CvrFn
bool parse_CvrFn(ArgIt &curarg)
Definition Arguments.cc:263
Arguments::Default_Verbosity
static const VERBOSITY Default_Verbosity
Definition Arguments.h:100
Arguments::Radius
ArgULong Radius
Definition Arguments.h:76
Arguments::Default_Check
static const bool Default_Check
Definition Arguments.h:105
Arguments::Verbosity
ArgVerbosity Verbosity
Definition Arguments.h:79
Arguments::parse_Goal
bool parse_Goal(ArgIt &curarg)
Definition Arguments.cc:566
Arguments::ArgIt
std::vector< std::string >::const_iterator ArgIt
Definition Arguments.h:90
Arguments::parse_Encryption
bool parse_Encryption(ArgIt &curarg)
Definition Arguments.cc:436
Arguments::Passphrase
ArgString Passphrase
Definition Arguments.h:70
Arguments::FileList
ArgStringList FileList
Definition Arguments.h:82
Arguments::parse_Command
void parse_Command(ArgIt &curarg)
Definition Arguments.cc:119
Arguments::parse_Verbosity
bool parse_Verbosity(ArgIt &curarg)
Definition Arguments.cc:619
Arguments::Checksum
ArgBool Checksum
Definition Arguments.h:71
Arguments::TheArguments
std::vector< std::string > TheArguments
Definition Arguments.h:140
Arguments::GmlGraphRecDepth
ArgUInt GmlGraphRecDepth
Definition Arguments.h:84
Arguments::parse_Passphrase
bool parse_Passphrase(ArgIt &curarg)
Definition Arguments.cc:325
Arguments::Compression
ArgInt Compression
Definition Arguments.h:72
Arguments::Default_DebugLevel
static const unsigned int Default_DebugLevel
Definition Arguments.h:106
Arguments::stdin_isused
bool stdin_isused(void) const
Definition Arguments.cc:779
Arguments::Check
ArgBool Check
Definition Arguments.h:81
Arguments::parse_EmbedEmbFn
bool parse_EmbedEmbFn(ArgIt &curarg)
Definition Arguments.cc:414
Arguments::Default_EncAlgo
static const EncryptionAlgorithm Default_EncAlgo
Definition Arguments.h:94
Arguments::parse
void parse(void)
Definition Arguments.cc:57
Arguments::NoCompression
static const int NoCompression
Definition Arguments.h:92
Arguments::StgFn
ArgString StgFn
the stego file name, "" if stdout/stdin
Definition Arguments.h:69
Arguments::EncMode
ArgEncMode EncMode
Definition Arguments.h:75
Arguments::Goal
ArgFloat Goal
Definition Arguments.h:77
Arguments::EmbedEmbFn
ArgBool EmbedEmbFn
Definition Arguments.h:73
Arguments::ExtFn
ArgString ExtFn
the extract file name, "" if stdout
Definition Arguments.h:65
Arguments::getPassphrase
std::string getPassphrase(bool doublecheck=false)
Definition Arguments.cc:738
Arguments::Default_GmlStartVertex
static const unsigned int Default_GmlStartVertex
Definition Arguments.h:108
Arguments::CommandString
std::string CommandString
the name of the command to be executed in this session (as supplied by the user)
Definition Arguments.h:60
Arguments::DebugCommand
ArgDebugCommand DebugCommand
Definition Arguments.h:80
Arguments::Default_Checksum
static const bool Default_Checksum
Definition Arguments.h:96
Arguments::DebugLevel
ArgUInt DebugLevel
Definition Arguments.h:83
Arguments::parse_Radius
bool parse_Radius(ArgIt &curarg)
Definition Arguments.cc:538
Arguments::parse_Compression
bool parse_Compression(ArgIt &curarg)
Definition Arguments.cc:369
Arguments::CvrFn
ArgString CvrFn
the cover file name, "" if stdin
Definition Arguments.h:67
Arguments::parse_ExtFn
bool parse_ExtFn(ArgIt &curarg)
Definition Arguments.cc:232
Arguments::parse_Force
bool parse_Force(ArgIt &curarg)
Definition Arguments.cc:597
Arguments::GmlStartVertex
ArgUInt GmlStartVertex
Definition Arguments.h:85
Arguments::Force
ArgBool Force
Definition Arguments.h:78
Arguments::Command
ArgCommand Command
the command to be executed in this session
Definition Arguments.h:58
Arguments::EncAlgo
ArgEncAlgo EncAlgo
Definition Arguments.h:74
Arguments::Default_Force
static const bool Default_Force
Definition Arguments.h:99
Arguments::parse_StgFn
bool parse_StgFn(ArgIt &curarg)
Definition Arguments.cc:294
Arguments::Arguments
Arguments(void)
Definition Arguments.h:40
Arguments::Default_Compression
static const int Default_Compression
Definition Arguments.h:97
Arguments::Default_EncMode
static const EncryptionMode Default_EncMode
Definition Arguments.h:95
Arguments::Default_Goal
static float Default_Goal
Definition Arguments.h:103
Arguments::setDefaults
void setDefaults(void)
Definition Arguments.cc:794
Arguments::Max_Algorithm
static const unsigned int Max_Algorithm
Definition Arguments.h:102
Arguments::parse_Checksum
bool parse_Checksum(ArgIt &curarg)
Definition Arguments.cc:347
Arguments::Default_DebugCommand
static const DEBUGCOMMAND Default_DebugCommand
Definition Arguments.h:104
Arguments::Default_Radius
static const unsigned long Default_Radius
Definition Arguments.h:101
EncryptionAlgorithm
Definition EncryptionAlgorithm.h:26
EncryptionMode
Definition EncryptionMode.h:26