cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1332
Views
1
Helpful
27
Replies

fetchstats login failed

katsmeow
Level 1
Level 1

I've tried everything to get fetchstats to work but always get "login failed. check username and password."

Although I confirmed I can log into the website with this password, and that I'm not using any characters reserved for url encoding, I tried changing the password anyway.  Same result. 

My password does contain an exclamation point, which is not reserved but I tried escaping it anyway. Same result.

I tried running the script in an elevated command prompt. Same result.

I tried giving "full control" permission to administrators, and the username I'm logged in with.  Same result.

I've tried variations on the command entered, eg :

cscript //NoLogo fetchstats.vbs myemail@domain.com 12345678 2015-10-08

cscript //NoLogo fetchstats.vbs myemail@domain.com 12345678 2015-10-08 2015-10-08

cscript //NoLogo fetchstats.vbs myemail@domain.com all 2015-10-08

cscript //NoLogo fetchstats.vbs myemail@domain.com networkname 2015-10-08

(The last one was found here in the forums : https://support.opendns.com/entries/70378300-fetchstats-throwing-Login-failed-error-with-correct-password)

Any other ideas?

27 Replies 27

mattwilson9090
Level 4
Level 4

It's possible, but since you are getting a "login failed" message that tends to indicate at least some communication with the server. You could try looking in your firewall/router logs to see what is being blocked.

I'm not sure what kind of device you are trying to make this work from, but for a test you could try bypassing the firewall somehow, or taking it to a different network.

uaruss
Level 1
Level 1

any luck with this?  I'm stuck on the same issue.  Why isn't there a download all button, instead of page by page on the web GUI??!?!?

rotblitz
Level 6
Level 6

What is this "same issue"?  Can't you login?  (This would be the "same issue".)

The "download all" button is missing, because OpenDNS have not foreseen this.  But you can use the opendns-fetchstats tool to download all pages from a start date to an end date, no matter how many pages there are.

uaruss
Level 1
Level 1

Correct, I cannot login.  

I've tried the following...

  • Changed my password multiple times and googled URL special character encoding (https://perishablepress.com/stop-using-unsafe-characters-in-urls/).  I also reviewed your link to the percent encoding on wiki (good info)
  • Currently, my special character in my long-ish password is a ".", although I have tried others as well.
  • Using the number of the network (found in the dashboard URL) and the name of it.  
  • Using both the %40 and %%40 for the "@" character
  • All of these in both the curl VBS and the bash script
  • Using the 'echo' command with the password in curl
  • Different wifi networks

Any help is greatly appreciated.

rotblitz
Level 6
Level 6

What is the exact error message? Or can you post a screen shot?

uaruss
Level 1
Level 1

Here's a screenshot.  The black box are the curl attempts.  The blue box is bash of course.  You'll see "Home" as the networkID on the last 2 bash attempts.  On all of the other attempts, I used the actual number that appears in the URL.  Thanks!

 

support.opendns.com_hc_user_images_tNUtzSKIh-qtCa2yn1Cmvw.jpeg

rotblitz
Level 6
Level 6

Well, the command syntax is as follows:

cscript //NoLogo fetchstats.vbs UserName network_ID YYYY-MM-DD [YYYY-MM-DD]

The [...] indicates an optional parameter, and the square brackets must not appear.
Do I see a ";" before your %40gmail.com or %%40gmail.com?  There shouldn't be a semicolon.
Re network ID, best is to use the numeric network ID.  Label name like "Home" definitely cannot work.

Also, the opendns-fetchstats tool is not OpenDNS', but from an individual (R. Crowley).  You better raise related issues with the author at https://github.com/opendns/opendns-fetchstats or at https://github.com/rcrowley/opendns-fetchstats

Alternatively, if you know how to debug VBS, you can do so to see what username and password is actually submitted in the HTTPS request of the scripts, so that you see what's wrong.

uaruss
Level 1
Level 1

I grabbed the code from github and was able to get it working.  FWIW, I used the "@" symbol in the email address and it worked successfully.  Thanks.

rotblitz
Level 6
Level 6

Interesting.  Where did you get the original script from which did not work?

khalma1r
Level 1
Level 1

Despite it worked for me in 2018, whereas last post in this thread was in 2016, for some reason the original script stopped working now.

Anyways, a workaround that worked for me is to remove the following block from the code (or comment it):

 

If loginMatches.Count = 0 Then
 Wscript.StdErr.Write "Login Failed. Check username and password" & vbCrLf
 WScript.Quit 1
End If

Regards,

Mohammad

starbus
Level 1
Level 1

Mohammad's tip to comment out 4 lines worked for me!!!

Now, please tell me: How can I pipe the massive CSV output dump to a text file on my hard drive?

emailzolder
Level 1
Level 1

Work around fetchstats.vbs
Goto: https://github.com/opendns/opendns-fetchstats/blob/master/fetchstats.vbs
Copy the 106 lines
Open write and paste the 106 lines.
Safe as fetchstats.vbs. change the *.TXT to *.*
Change line 78:  regEx.Pattern = ".*Login*"

Open DOSpromt with: CMD
Goto DIR where located the fetchstats.vbs

C:\Users\name\openDNS>

cscript /NoLogo fetchstats.vbs <username> <network-id> <YYYY-MM-DD> [<YYYY-MM-DD>]


Type: cscript //NoLogo fetchstats.vbs email@xyzmail.com 123459876 2020-03-19 >20200319.csv
Entering
Asking for password  and Type your password
Enter And wait a while for data
Goto your DIR where the fetchstats.vbs file is located.
And there is new file whith 20200319.csv
Done.