Nmap Development mailing list archives

Re: New script - http-git.nse


From: Alex Weber <alexwebr () gmail com>
Date: Thu, 19 Jul 2012 23:50:32 -0500

On Thu, Jul 19, 2012 at 1:20 PM, David Fifield <david () bamsoftware com>wrote:

On Wed, Jun 27, 2012 at 11:15:32PM -0500, Alex Weber wrote:
Hello,

I finished the http-git script from the Script Ideas wiki page. It looks
for a Git repository in a webserver's root and tries to get as much
information about it as possible.
Here is two examples of output:

PORT   STATE SERVICE
80/tcp open  http
| http-git:·
|   Potential Git repository found in web root (found 5 of 6 expected
files)
|   Contents of '.git/COMMIT_EDITMSG' matched patterns 'passw'
(case-insensitive)
|   Last commit message: Brought the github repo up-to-date with my
private
subversio...
|   Repository description: Unnamed repository; edit this file
'description' to name the...
|_  GitHub remote: skullspace/breachdb (accessed over SSH)

PORT   STATE SERVICE
80/tcp open  http
| http-git:·
|   Git repository found in web root
|   Last commit message: This is my last commit...
|   Repository description: Unnamed repository; edit this file
'description' to name the...
|   GitHub remote: AlexWebr/nse (accessed over SSH)
|   BitBucket remote: AlexWebr/nse (accessed over HTTP, pull-only)
|_  Based on the file '.gitignore', this is a Ruby on Rails application

Great job on this script. I think it's going to be well appreciated. I
committed it in r29273. If you would, there are some small additional
changes I'd like you to make.

As Daniel suggested, please add an http-git.path script argument to
control the root of the HTTP GETs.

|   GitHub remote: AlexWebr/nse (accessed over SSH)
|   BitBucket remote: AlexWebr/nse (accessed over HTTP, pull-only)

I think everybody would prefer to see URLs that can be copied and pasted
to git here. Looking for strings like "github.com" and replacing them
with "GitHub remote" makes the output less useful. I would just print
the remote URLs verbatim from the config file.

You can send future changes as patches to the mailing list, or as a
pointer to wherever you have the script in github (as long as the github
has merged any nmap.org changes).

David Fifield


A stray `ap(config)` ended up in the committed version - Ron removed it and
committed it as r29279.
Thanks for the suggestions - I'll be sending a patch along soon :)

-Alex Weber
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: