예제 #1
0
def main():
    console = Console(prompt="firewall", prompt_delim=">")
    show = Command("show", help="Show command helper")
    setup = Command("setup", help="Setup options")


    console.loop()
예제 #2
0
def main():
    console = Console("marvin", ">")
    notebook = NotebookSDK("notebook")
    dryrun = DryRunSDK("dryrun")

    console.addChild(notebook)
    console.addChild(dryrun)
    console.loop()
예제 #3
0
파일: cisco.py 프로젝트: SvenChmie/ishell
def main():
    console = Console("RouterA")
    enable = Enable("enable", help="Enter enable mode")
    ping = PingCommand('ping', help="Ping destination ip. Ex: ping 8.8.8.8")
    traceroute = TraceRouteCommand('traceroute', help="Trace route to destination ip. Ex: traceroute 8.8.8.8")
    console.addChild(enable)
    console.addChild(ping)
    console.addChild(traceroute)
    console.loop()
예제 #4
0
def main():
    console = Console("root@dev:~", '#')
    ls = LS("ls")
    bash = Bash("bash")
    top = Top("top")
    console.addChild(ls)
    console.addChild(bash)
    console.addChild(top)
    console.addChild(Command('show')).addChild(Command('disk')).addChild(DiskIO('io'))
    console.loop()
예제 #5
0
def main():
    console = Console("RouterA")
    enable = Enable("enable", help="Enter enable mode")
    ping = PingCommand('ping', help="Ping destination ip. Ex: ping 8.8.8.8")
    traceroute = TraceRouteCommand(
        'traceroute',
        help="Trace route to destination ip. Ex: traceroute 8.8.8.8")
    console.addChild(enable)
    console.addChild(ping)
    console.addChild(traceroute)
    console.loop()
예제 #6
0
def main():
    console = Console("root@dev:~", '#')
    ls = LS("ls")
    bash = Bash("bash")
    top = Top("top")
    console.addChild(ls)
    console.addChild(bash)
    console.addChild(top)
    console.addChild(Command('show')).addChild(Command('disk')).addChild(
        DiskIO('io'))
    console.loop()
예제 #7
0
fd_console.addChild(samples)
fd_console.addChild(modules)
fd_console.addChild(run)
fd_console.addChild(options)
fd_console.addChild(set_command)
fd_console.addChild(unset)


#--------
# Main menu
#
print """Welcome to FeatherDuster!

To get started, use 'import' to load samples.
Then, use 'analyze' to analyze/decode samples and get attack recommendations.
Next, run the 'use' command to select an attack module.
Finally, use 'run' to run the attack and see its output.

For a command reference, press Enter on a blank line.
"""

for filename in sys.argv[1:]:
   sample_file = filename
   sample_fh = open(sample_file,'r')
   feathermodules.samples.append(sample_fh.read())
   sample_fh.close()

fd_console.loop()

print '\nThank you for using FeatherDuster!'
예제 #8
0
    if filename in ['-h', '--help']:
        print 'Usage: python featherduster.py [ciphertext file 1] ... [ciphertext file n]'
        exit()
    elif filename in ['-d', '--debug']:
        debug = True
    try:
        sample_fh = open(filename, 'r')
        feathermodules.samples.append(sample_fh.read())
        sample_fh.close()
    except:
        continue

print """Welcome to FeatherDuster!

To get started, use 'import' to load samples.
Then, use 'analyze' to analyze/decode samples and get attack recommendations.
Next, run the 'use' command to select an attack module.
Finally, use 'run' to run the attack and see its output.

For a command reference, press Enter on a blank line.
"""

fd_console.loop()

print '\nThank you for using FeatherDuster!'


def main():
    # blank function so I don't have to restructure this whole file to address an annoying error
    return 0
예제 #9
0
파일: hqlsh.py 프로젝트: anhtranbk/hqlsh
        return parse_to_table(r.json())
    except (ValueError, TypeError) as e:
        print 'Error', e


class GetCommand(Command):
    def run(self, line):
        params = line.split()
        data = get(table=params[1], row=params[2])
        if data:
            print_table(data)


class ScanCommand(Command):
    def run(self, line):
        params = line.split()
        prefix = params[2] if len(params) >= 3 else ''
        limit = params[3] if len(params) >= 4 else 100
        data = scan(table=params[1], row_prefix=prefix, limit=limit)
        if data:
            print_table(data)


get_command = GetCommand("get", help="Get a row")
scan_command = ScanCommand("scan", help="Scan rows")

console = Console(prompt="", prompt_delim="hqlsh>")
console.addChild(get_command)
console.addChild(scan_command)
console.loop()
예제 #10
0
파일: firewall.py 프로젝트: subpl/firewall
def main():
    console = Console(prompt="firewall", prompt_delim=">")
    show = Command("show", help="Show command helper")
    setup = Command("setup", help="Setup options")

    console.loop()