Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using on windows #7

Open
benohara opened this issue May 20, 2019 · 3 comments
Open

Using on windows #7

benohara opened this issue May 20, 2019 · 3 comments

Comments

@benohara
Copy link

benohara commented May 20, 2019

If I echo a password to this script on windows it doesnt appear to work, it does if it ignored and the password is prompted for...

strangely, i looks as if when echoing the password the initial auth passes and then when it calls the post auth url it gets back a permission denied.

DEBUG:urllib3.connectionpool:https://monitor.example.com:443 "POST /authentication/login HTTP/1.1" 200 None
INFO:root:Request result = 200
INFO:root:Result URL after login = https://monitor.example.com/authentication/login
INFO:root:Login was successful

Looks like we passed auth...

INFO:root:Making requests of interest ...

Requests the post auth url...

INFO:root:Performing GET on https://monitor.example.com/reporting/report/show?report=Host%20SLA&hostgroup=Customer%20Servers&timeframes=one_week&download=1 ...

DEBUG:urllib3.connectionpool:https://monitor.example.com:443 "GET /reporting/report/show?report=Host%20SLA&hostgroup=Customer%20Servers&timeframes=one_week&download=1 HTTP/1.1" 302 None

DEBUG:urllib3.connectionpool:https://monitor.example.com:443 "GET /authentication/login?redirect=reporting%2Freport%2Fshow%3Freport%3DHost%2520SLA%26hostgroup%3DCustomer%2520Servers%26timeframes%3Done_week%26download%3D1 HTTP/1.1" 200 None
INFO:root:Request result = 200

Got back permission denied and redirected to the login page.

This works fine when run on linux (or when the password is prompted for on windows)

@JElchison
Copy link
Owner

I'm not seeing enough detail that would allow me to attempt to reproduce. How exactly are you echo'ing in Windows? What shell are you using? Any chance the method you're using is including unwanted or escaped characters?

@benohara
Copy link
Author

No worries, yeah, there nothing strange in the password.

Strangely, I seem to get back 200 from /authentication/login with the wrong password so looks like i maybe went down the wrong path.

Anyways, changing the script, so instead of prompting for the password, just setting password = "xyz" and all works fine.

I was doing

echo "password" | script.py options

Which didnt work, however Im not a windows user so probably missing something obvious.

@JElchison
Copy link
Owner

What version of Windows? And what shell?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants