from pentest.command import JarvisCmd
import sys

__name__ = "dnsrecon"


def main():
	args_config = {
		'passthrough_args': ['-c', '--csv', '-j', '--json', '--xml', '-h', '--help'],
		'output_args': [
			{
				'format': 'json',
				'arg': '-j'
			},
			{
				'format': 'csv',
				'arg': '-c'
			},
			{
				'format': 'xml',
				'arg': '--xml'
			}
		]
	}

	cmd = JarvisCmd(sys.argv)
	cmd.set_args_config(args_config)

	if '-d' not in cmd.args:
		cmd.run()

	try:
		target = cmd.args[cmd.args.index('-d') + 1]
	except IndexError:
		cmd.run()
	cmd.run(target)
