Commit 1797eb42 authored by Łukasz Nowak's avatar Łukasz Nowak

cli: Import only what needed

parent 8ad8f8ee
import click import click
from pprint import pprint from pprint import pprint
from . import recurls from .recurls import Recurls
@click.command(short_help="Runs curl's wrapper recurl") @click.command(short_help="Runs curl's wrapper recurl")
@click.option('--headers/--no-headers', help="Shows response headers", default=False, show_default=True) @click.option('--headers/--no-headers', help="Shows response headers", default=False, show_default=True)
...@@ -11,7 +11,7 @@ from . import recurls ...@@ -11,7 +11,7 @@ from . import recurls
@click.option('--ip', help="IP to resolve to") @click.option('--ip', help="IP to resolve to")
@click.argument("url") @click.argument("url")
def runRecurl(headers, output, verbose, curl, follow, ip, url): def runRecurl(headers, output, verbose, curl, follow, ip, url):
mimikra = recurls.Recurls(curl) mimikra = Recurls(curl)
response = mimikra.get(url, ip=ip, allow_redirects=follow) response = mimikra.get(url, ip=ip, allow_redirects=follow)
print('Effective HTTP version:', response.effective_http_version) print('Effective HTTP version:', response.effective_http_version)
print('Response status code:', response.status_code) print('Response status code:', response.status_code)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment