kost / dvcs-ripper

Rip web accessible (distributed) version control systems: SVN/GIT/HG...
GNU General Public License v2.0
1.66k stars 308 forks source link

question on such an answer from the script #21

Open shrv opened 6 years ago

shrv commented 6 years ago

on one resource while testing as "black box", i found response for requests

https://xxx.example.com/revision.txt
https://xxx.example.com/revision.inc

I decided to try to pull out the repository by your tool, which already many times helped out on CTF quests. And received such an answer:

[!] Not found for https://xxx.example.com///.svn/all-wcprops => /.svn/all-wcprops: 404 Not Found
[!] Not found for https://xxx.example.com///.svn/entries => /.svn/entries: 404 Not Found
[!] Not found for https://xxx.example.com///.svn/format => /.svn/format: 404 Not Found
[!] Not found for https://xxx.example.com///.svn/wc.db => /.svn/wc.db: 404 Not Found
[i] Found new SVN client storage format!
DBD::SQLite::db prepare failed: file is encrypted or is not a database at ./rip-svn.pl line 88.
Couldn't prepare statement 'SELECT id,root,uuid FROM repository': file is encrypted or is not a database at ./rip-svn.pl line 88.
Can't call method "execute" on an undefined value at ./rip-svn.pl line 89.

request:

./rip-svn.pl -vv -u https://xxx.example.com

Tell me, how to perceive, is there a repository and a file with a password? Or there is no repository? Thank's

kost commented 6 years ago

Looks like new repository is not available according to logs you sent: /.svn/wc.db: 404 Not Found

Could you please run

file .svn/wc.db

on that downloaded file.

shrv commented 6 years ago

Thanks for your reply. I'll check when I'm at my laptop.

But today I see another answer from the site. the script no longer finds the repository :). I think that the administrators from the other side saw my attempts through the logs and closed everything. I have not contacted them yet, and did not specify them :).

noraj commented 5 years ago

I also had:

$ rip-svn -v -u https://XXX/SVN/                                                                                                                                                              
[i] Found new SVN client storage format!                                                                                                                                                                                                                                        
DBD::SQLite::db prepare failed: file is not a database at /usr/bin/rip-svn line 88.                                                                                                                                                                                             
Couldn't prepare statement 'SELECT id,root,uuid FROM repository': file is not a database at /usr/bin/rip-svn line 88.                                                                                                                                                           
Can't call method "execute" on an undefined value at /usr/bin/rip-svn line 89.

And .svn/wc.db was an HTML file containing an HTTP error.

So it means that when rip-svn try to download wc.db it doesn't check afterward if it is really a SQLite db or for example a HTML file containing an error before trying to access the DB. So when it is a HTML file, of course SQLite is failing to open the "DB". By detecting the type of the file it is possible to handle this error properly and return a more explicit message.

blckraven commented 3 years ago

Does anyone have some solution?

kakahan22 commented 11 months ago

I also had:

$ rip-svn -v -u https://XXX/SVN/                                                                                                                                                              
[i] Found new SVN client storage format!                                                                                                                                                                                                                                        
DBD::SQLite::db prepare failed: file is not a database at /usr/bin/rip-svn line 88.                                                                                                                                                                                             
Couldn't prepare statement 'SELECT id,root,uuid FROM repository': file is not a database at /usr/bin/rip-svn line 88.                                                                                                                                                           
Can't call method "execute" on an undefined value at /usr/bin/rip-svn line 89.

And .svn/wc.db was an HTML file containing an HTTP error.

So it means that when rip-svn try to download wc.db it doesn't check afterward if it is really a SQLite db or for example a HTML file containing an error before trying to access the DB. So when it is a HTML file, of course SQLite is failing to open the "DB". By detecting the type of the file it is possible to handle this error properly and return a more explicit message. I have the same problem as you, would like to ask if there is a solution now