Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
recurls
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
recurls
Commits
25e2a39d
Commit
25e2a39d
authored
Apr 06, 2023
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cli: Allow to show command error
parent
340c944d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/recurls/cli.py
src/recurls/cli.py
+5
-1
No files found.
src/recurls/cli.py
View file @
25e2a39d
...
@@ -5,11 +5,12 @@ from . import recurls
...
@@ -5,11 +5,12 @@ from . 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
)
@
click
.
option
(
'--output/--no-output'
,
help
=
"Shows the output"
,
default
=
False
,
show_default
=
True
)
@
click
.
option
(
'--output/--no-output'
,
help
=
"Shows the output"
,
default
=
False
,
show_default
=
True
)
@
click
.
option
(
'--verbose/--no-verbose'
,
help
=
"Show curl's output"
,
default
=
False
,
show_default
=
True
)
@
click
.
option
(
'--curl'
,
help
=
"Path to curl binary"
,
default
=
'curl'
,
show_default
=
True
)
@
click
.
option
(
'--curl'
,
help
=
"Path to curl binary"
,
default
=
'curl'
,
show_default
=
True
)
@
click
.
option
(
'--follow/--no-follow'
,
help
=
"Follows redirects"
,
default
=
False
,
show_default
=
True
)
@
click
.
option
(
'--follow/--no-follow'
,
help
=
"Follows redirects"
,
default
=
False
,
show_default
=
True
)
@
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
,
curl
,
follow
,
ip
,
url
):
def
runRecurl
(
headers
,
output
,
verbose
,
curl
,
follow
,
ip
,
url
):
mimikra
=
recurls
.
Recurls
(
curl
)
mimikra
=
recurls
.
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
)
...
@@ -24,3 +25,6 @@ def runRecurl(headers, output, curl, follow, ip, url):
...
@@ -24,3 +25,6 @@ def runRecurl(headers, output, curl, follow, ip, url):
if
output
:
if
output
:
print
(
'Output:'
)
print
(
'Output:'
)
print
(
response
.
text
)
print
(
response
.
text
)
if
verbose
:
print
(
'curl output:'
)
print
(
response
.
command_error
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment