mirror of https://github.com/n1nj4sec/pupy.git
display transport arguments in pupygen -l
This commit is contained in:
parent
878ff47208
commit
4e92127280
|
@ -199,8 +199,13 @@ class ListOptions(argparse.Action):
|
|||
print ""
|
||||
print colorize("## available transports :","green")
|
||||
for name, dic in transports.iteritems():
|
||||
print "\t- {:<20} : {}".format(name, dic["info"])
|
||||
print ""
|
||||
print "\t- {}".format(name,)
|
||||
print "\t {:<15} : {}".format("description", dic["info"])
|
||||
arguments=','.join([x for x in dic["client_kwargs"].iterkeys()])+','.join([x for x in dic["client_transport_kwargs"].iterkeys()])
|
||||
if not arguments:
|
||||
arguments = "none"
|
||||
print "\t {:<15} : {}".format("arguments" ,arguments)
|
||||
|
||||
print colorize("## available scriptlets :", "green")
|
||||
scriptlets_dic=load_scriptlets()
|
||||
for name, sc in scriptlets_dic.iteritems():
|
||||
|
|
|
@ -24,13 +24,14 @@ class Scriptlet(object):
|
|||
|
||||
@classmethod
|
||||
def get_help(cls):
|
||||
res=("\tdescription: %s\n"%cls.__doc__)
|
||||
res=("\tdescription : %s\n"%cls.__doc__)
|
||||
if cls.arguments:
|
||||
res+=("\targuments: \n")
|
||||
res+=("\targuments : \n")
|
||||
for arg, desc in cls.arguments.iteritems():
|
||||
res+="\t\t- {:<10} : {}\n".format(arg, desc)
|
||||
res+="\t\t\t{:<10} : {}\n".format(arg, desc)
|
||||
else:
|
||||
res+=("\targuments: this scriptlet does not take any argument\n")
|
||||
res+=("\targuments : \n")
|
||||
res+="\t\t\t{:<10}\n".format("no arguments")
|
||||
return res
|
||||
|
||||
ROOT=os.path.abspath(os.path.join(os.path.dirname(__file__),"..","packages"))
|
||||
|
|
Loading…
Reference in New Issue