<s> from kippo_extra . utils import ExtendedHoneyPotCommand , ModifiedOptionParser , OptionParsingError , OptionParsingExit <EOL> commands = { } <EOL> class command_uname ( ExtendedHoneyPotCommand ) : <EOL> def call ( self ) : <EOL> """<STR_LIT>""" <EOL> parser = ModifiedOptionParser ( add_help_option = False ) <EOL> parser . add_option ( "<STR_LIT>" , dest = "<STR_LIT>" , action = "<STR_LIT:store_true>" ) <EOL> parser . add_option ( "<STR_LIT>" , dest = "<STR_LIT:version>" , action = "<STR_LIT:store_true>" ) <EOL> parser . add_option ( "<STR_LIT>" , "<STR_LIT>" , dest = "<STR_LIT:all>" , action = "<STR_LIT:store_true>" ) <EOL> parser . add_option ( <EOL> "<STR_LIT>" , "<STR_LIT>" , dest = "<STR_LIT:name>" , action = "<STR_LIT:store_true>" ) <EOL> parser . add_option ( <EOL> "<STR_LIT>" , "<STR_LIT>" , dest = "<STR_LIT>" , action = "<STR_LIT:store_true>" ) <EOL> parser . add_option ( <EOL> "<STR_LIT>" , "<STR_LIT>" , dest = "<STR_LIT>" , action = "<STR_LIT:store_true>" ) <EOL> parser . add_option ( <EOL> "<STR_LIT>" , "<STR_LIT>" , dest = "<STR_LIT>" , action = "<STR_LIT:store_true>" ) <EOL> parser . add_option ( <EOL> "<STR_LIT>" , "<STR_LIT>" , dest = "<STR_LIT>" , action = "<STR_LIT:store_true>" ) <EOL> parser . add_option ( <EOL> "<STR_LIT>" , "<STR_LIT>" , dest = "<STR_LIT>" , action = "<STR_LIT:store_true>" ) <EOL> parser . add_option ( <EOL> "<STR_LIT>" , "<STR_LIT>" , dest = "<STR_LIT>" , action = "<STR_LIT:store_true>" ) <EOL> try : <EOL> ( opts , args ) = parser . parse_args ( list ( self . args ) ) <EOL> except OptionParsingError , e : <EOL> self . bad_argument ( self . args [ <NUM_LIT:0> ] ) <EOL> return <EOL> except OptionParsingExit , e : <EOL> self . bad_argument ( e ) <EOL> return <EOL> if opts . help : <EOL> self . help ( ) <EOL> elif opts . version : <EOL> self . writeln ( "<STR_LIT>" ) <EOL> elif opts . all : <EOL> self . writeln ( <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" % self . honeypot . hostname ) <EOL> else : <EOL> parts = [ ] <EOL> if opts . name : <EOL> parts . append ( "<STR_LIT>" ) <EOL> if opts . release : <EOL> parts . append ( "<STR_LIT>" ) <EOL> if opts . kernel : <EOL> parts . append ( "<STR_LIT>" ) <EOL> if opts . machine : <EOL> parts . append ( "<STR_LIT>" ) <EOL> if opts . processor : <EOL> parts . append ( "<STR_LIT>" ) <EOL> if opts . hardware : <EOL> parts . append ( "<STR_LIT>" ) <EOL> if opts . os : <EOL> parts . append ( "<STR_LIT>" ) <EOL> if parts : <EOL> self . writeln ( "<STR_LIT:U+0020>" . join ( parts ) ) <EOL> else : <EOL> self . writeln ( "<STR_LIT>" ) <EOL> def bad_argument ( self , argument ) : <EOL> self . writeln ( """<STR_LIT>""" % argument ) <EOL> def help ( self ) : <EOL> self . writeln ( """<STR_LIT>""" ) <EOL> commands [ '<STR_LIT>' ] = command_uname </s>
