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 */
Arguments::Check
ArgBool Check
Definition: Arguments.h:81
DEBUGCOMMAND
DEBUGCOMMAND
Definition: Arg.h:55
Arguments::GmlStartVertex
ArgUInt GmlStartVertex
Definition: Arguments.h:85
Arguments::EncAlgo
ArgEncAlgo EncAlgo
Definition: Arguments.h:74
Arguments::GmlGraphRecDepth
ArgUInt GmlGraphRecDepth
Definition: Arguments.h:84
Arguments::ExtFn
ArgString ExtFn
the extract file name, "" if stdout
Definition: Arguments.h:65
Arguments
parsing and data representation of command-line arguments
Definition: Arguments.h:38
Arguments::Command
ArgCommand Command
the command to be executed in this session
Definition: Arguments.h:58
Arg.cc
Arguments::parse
void parse(void)
Definition: Arguments.cc:57
Arguments::Compression
ArgInt Compression
Definition: Arguments.h:72
Arguments::parse_Goal
bool parse_Goal(ArgIt &curarg)
Definition: Arguments.cc:566
Arguments::Default_Force
static const bool Default_Force
Definition: Arguments.h:99
Arguments::parse_Command
void parse_Command(ArgIt &curarg)
Definition: Arguments.cc:119
Arguments::Default_GmlGraphRecDepth
static const unsigned int Default_GmlGraphRecDepth
Definition: Arguments.h:107
Arguments::DebugLevel
ArgUInt DebugLevel
Definition: Arguments.h:83
EncryptionAlgorithm
Definition: EncryptionAlgorithm.h:26
VERBOSITY
VERBOSITY
Definition: Arg.h:54
Arguments::TheArguments
std::vector< std::string > TheArguments
Definition: Arguments.h:140
Arguments::Default_DebugCommand
static const DEBUGCOMMAND Default_DebugCommand
Definition: Arguments.h:104
Arguments::Verbosity
ArgVerbosity Verbosity
Definition: Arguments.h:79
Arguments::parse_EmbFn
bool parse_EmbFn(ArgIt &curarg)
Definition: Arguments.cc:201
Arguments::parse_CvrFn
bool parse_CvrFn(ArgIt &curarg)
Definition: Arguments.cc:263
Arguments::Default_EncAlgo
static const EncryptionAlgorithm Default_EncAlgo
Definition: Arguments.h:94
Arguments::Default_Checksum
static const bool Default_Checksum
Definition: Arguments.h:96
Arg< COMMAND >
Arguments::Default_Compression
static const int Default_Compression
Definition: Arguments.h:97
Arguments::parse_Radius
bool parse_Radius(ArgIt &curarg)
Definition: Arguments.cc:538
Arguments::Default_Goal
static float Default_Goal
Definition: Arguments.h:103
Arguments::ArgIt
std::vector< std::string >::const_iterator ArgIt
Definition: Arguments.h:90
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::Default_DebugLevel
static const unsigned int Default_DebugLevel
Definition: Arguments.h:106
Arguments::parse_Checksum
bool parse_Checksum(ArgIt &curarg)
Definition: Arguments.cc:347
Arguments::EmbFn
ArgString EmbFn
the embed file name, "" if stdin
Definition: Arguments.h:63
Arguments::parse_Force
bool parse_Force(ArgIt &curarg)
Definition: Arguments.cc:597
Arguments::EncMode
ArgEncMode EncMode
Definition: Arguments.h:75
Arguments::Default_Radius
static const unsigned long Default_Radius
Definition: Arguments.h:101
Arguments::parse_Compression
bool parse_Compression(ArgIt &curarg)
Definition: Arguments.cc:369
EncryptionMode
Definition: EncryptionMode.h:26
Arguments::Default_EmbedEmbFn
static const bool Default_EmbedEmbFn
Definition: Arguments.h:98
Arguments::NoCompression
static const int NoCompression
Definition: Arguments.h:92
NONE
Definition: Arg.h:55
Arguments::parse_StgFn
bool parse_StgFn(ArgIt &curarg)
Definition: Arguments.cc:294
NORMAL
Definition: Arg.h:54
Arguments::StgFn
ArgString StgFn
the stego file name, "" if stdout/stdin
Definition: Arguments.h:69
Arguments::parse_Verbosity
bool parse_Verbosity(ArgIt &curarg)
Definition: Arguments.cc:619
Arguments::DebugCommand
ArgDebugCommand DebugCommand
Definition: Arguments.h:80
Arguments::getPassphrase
std::string getPassphrase(bool doublecheck=false)
Definition: Arguments.cc:738
Arguments::FileList
ArgStringList FileList
Definition: Arguments.h:82
Arguments::Default_EncMode
static const EncryptionMode Default_EncMode
Definition: Arguments.h:95
Arguments::Checksum
ArgBool Checksum
Definition: Arguments.h:71
Arg.h
Arguments::parse_Debug
bool parse_Debug(ArgIt &curarg)
Definition: Arguments.cc:655
Arguments::parse_Passphrase
bool parse_Passphrase(ArgIt &curarg)
Definition: Arguments.cc:325
Arguments::Arguments
Arguments(void)
Definition: Arguments.h:40
Arguments::stdin_isused
bool stdin_isused(void) const
Definition: Arguments.cc:779
Arguments::setDefaults
void setDefaults(void)
Definition: Arguments.cc:794
Arguments::parse_EmbedEmbFn
bool parse_EmbedEmbFn(ArgIt &curarg)
Definition: Arguments.cc:414
Arguments::parse_Encryption
bool parse_Encryption(ArgIt &curarg)
Definition: Arguments.cc:436
Arguments::EmbedEmbFn
ArgBool EmbedEmbFn
Definition: Arguments.h:73
Arguments::Force
ArgBool Force
Definition: Arguments.h:78
Arguments::parse_ExtFn
bool parse_ExtFn(ArgIt &curarg)
Definition: Arguments.cc:232
Arguments::CvrFn
ArgString CvrFn
the cover file name, "" if stdin
Definition: Arguments.h:67
Arguments::Goal
ArgFloat Goal
Definition: Arguments.h:77
Arguments::Max_Algorithm
static const unsigned int Max_Algorithm
Definition: Arguments.h:102
Arguments::Default_Verbosity
static const VERBOSITY Default_Verbosity
Definition: Arguments.h:100
Arguments::Default_GmlStartVertex
static const unsigned int Default_GmlStartVertex
Definition: Arguments.h:108
Arguments::Default_Check
static const bool Default_Check
Definition: Arguments.h:105
Arguments::Radius
ArgULong Radius
Definition: Arguments.h:76
Arguments::Passphrase
ArgString Passphrase
Definition: Arguments.h:70