kost / dvcs-ripper

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

Create a folder for every site/project #11

Closed rodrigograca31 closed 8 years ago

rodrigograca31 commented 8 years ago

It should create a new folder with the website name everytime that it's executed....

Otherwise I can't get more than 1 site.... Both create the .git folder....

The sqlmap project does this... it has a folder called output where it creates folders like "example.com", "google.com"*, ....

Thanks!

rodrigograca31 commented 8 years ago

I'm trying to implent this.... But it's my first time writing code in Perl....

So far, I've added

use URI ();

and then:

my $url = URI->new( $config{'url'} );
mkdir $url->host;

before:

my $gd=$config{'gitdir'}."/";

which I was trying to modify to something like this:

my $gd=$url->host."/".$config{'gitdir'}."/";

But then it stops working.... (It doesn't download the repo)....

Help? :)

kost commented 8 years ago

Your request is implemented as part of BHEU2015 release: https://www.blackhat.com/eu-15/arsenal.html#dvcs-ripper

Just use -m -o /dir/where/you/want/to/store - Here's examples:

Download git tree to specific output dir:

rip-git.pl -o /my/previously/made/dir -v -u http://www.example.com/.git/

Download git tree to specific output dir (creating dir http_www.example.com.git_ for url):

rip-git.pl -m -o /dir -v -u http://www.example.com/.git/

rodrigograca31 commented 8 years ago

@kost Nicely done!

I would prefer if this was automatic (no flags needed) but it's ok like this....

I will test it later :)