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

401 Unauthorized #73

Open
adithyapi4 opened this issue Nov 25, 2024 · 13 comments
Open

401 Unauthorized #73

adithyapi4 opened this issue Nov 25, 2024 · 13 comments

Comments

@adithyapi4
Copy link

I am getting the "401 Unauthorized" Error when I try to restore from the modified backup file for gaining root access. I reset the router and tried again with no change. Kindly post a fix to this issue. Thanks in advance.
image

@itsyourap
Copy link
Collaborator

Can you tell me what steps have you exactly followed after decrypting the backup?

@adithyapi4
Copy link
Author

I replaced the first line of the file with the following line:
config.userdb = {} os.execute("/usr/sbin/telnetd"); os.execute("/pfrm2.0/bin/iptables -I fwInBypass -p tcp --dport 23 -m ifgroup --ifgroup-in 0x1/0x1 -j ACCEPT"); os.execute("echo -e \"password\npassword\" | passwd root");

I encrypted the modified text file with the command openssl aes-128-cbc -pass file:key.txt -in RSTOTAG00065040_JCO4032.txt -out RSTOTAG00065040_JCO4032.enc

Then I tried restoring the encrypted file only to receive the above mentioned error.

@adithyapi4
Copy link
Author

I was able to gain root access before the firmware was upgraded to SRCMTF1_JCO4032_R2.57

@itsyourap
Copy link
Collaborator

Did you create the backup before upgrading or did you do it after upgrade?

@adithyapi4
Copy link
Author

First I tried using a backup file that I had created before upgrading and got the 401 Unauthorized error. So I tried again by downloading a new backup file and then restoring from it but got the same error

@adithyapi4
Copy link
Author

I am getting the same error even if I try to restore from the unmodified backup file after resetting the router to its factory defaults

@itsyourap
Copy link
Collaborator

Thats unexpected. I think Jio messed something up (though it is very less likely since we have had no problems on R2.57).

@PotatoPC44
Copy link

This method worked for my JCOW414 on 2.57 and just a another tip. I also got 401 error but mine was fixed my doing the steps under 2 minutes of logging in the router because router locks itself after 2-3 minutes.

@adithyapi4
Copy link
Author

Tried it within 1 minute. Still the same issue

@itsyourap
Copy link
Collaborator

@adithyapi4 What do you have in key.txt?

It should have the hex key and not the regular key

@adithyapi4
Copy link
Author

The output of the keyguesser.py python file has two fields
Trying Key : QR....
Success : C99...
The key.txt file contains only the value in Success(C99...).

I don't think that is an issue because I have verified it by decrypting the modified backup file using keyguesser.py

@itsyourap
Copy link
Collaborator

Yes the "Success: XXXX" is indeed the key required to decrypt the file.
But I am not sure what problem you are facing to restore the backup.

It could be that the text file is in CRLF (if you are using windows). Make sure to modify the file to make the line endings LF before encrypting and reuploading.

@adithyapi4
Copy link
Author

I edited the the text file in LF using Visual Studio and encrypted it. Still facing the same issue when uploading it

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

3 participants