Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def print_api(address=FRITZ_IP_ADDRESS,
port=FRITZ_TCP_PORT,
user=FRITZ_USERNAME,
password=''):
"""Wrapper for FritzInspection to report the complete api."""
inspector = FritzInspection(address, port, user, password)
inspector.view_header()
inspector.view_complete()
def main():
"""CLI entry point."""
args = get_cli_arguments()
inspector = FritzInspection(
args.address, args.port, args.username, args.password)
inspector.view_header()
if args.services:
inspector.view_servicenames()
elif args.serviceactions:
inspector.view_actionnames(args.serviceactions[0])
elif args.servicearguments:
inspector.view_servicearguments(args.servicearguments[0])
elif args.actionarguments:
inspector.view_actionarguments(args.actionarguments[0],
args.actionarguments[1])
elif args.complete:
inspector.view_complete()
elif args.reconnect:
inspector.fc.reconnect()
print() # print an empty line
def print_servicenames(address=FRITZ_IP_ADDRESS,
port=FRITZ_TCP_PORT,
user=FRITZ_USERNAME,
password=''):
"""Wrapper for FritzInspection to report all service names."""
inspector = FritzInspection(address, port, user, password)
inspector.view_header()
inspector.view_servicenames()