Nmap Development mailing list archives

Re: Nmap-cgi errors


From: Brandon Enright <bmenrigh () ucsd edu>
Date: Mon, 3 Mar 2008 17:46:54 +0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Comments inline:

On Mon, 3 Mar 2008 11:31:32 -0600 or thereabouts "Sean Keane"
<keanesf () gmail com> wrote:

I have installed nmap cgi on one of my servers, and I can login and
start scans but I am getting a few errors in the nmap-cgi log. Below
is the log file


[Mon Mar 03 11:11:40 2008] [error] [client 192.168.0.2] Use of
uninitialized value in numeric eq (==)
...snip...
Use
of uninitialized value in numeric eq (==)
at /usr/share/nmap-cgi/api//Nmap/CGI/Main.pm line 90., referer:
http://192.168.0.3/index.pl

Just so no one has to look it up; the line of code referenced on
Scan.pmline 414:
$scan->{'admin'} = 1 if( ( defined $opts ) && ( $opts->{ADDADMIN} ==
1 ) );

I haven't looked at the code but based on the error above, if you
change line 414 to:
$scan->{'admin'} = 1 if( ( defined $opts ) && ( exists $opts->{ADDADMIN} ) && ( $opts->{ADDADMIN} == 1 ) );
your particular error should go away.


Main.pm line 90:
if( $opts->{'MUST-ADMIN'} == 1 )

You'll also want to change line 90 to:
if( ( exists $opts->{'MUST-ADMIN'} ) && ( $opts->{'MUST-ADMIN'} == 1 ) )

I suspect there is something else broken in the code though to cause
these hash elements to not exist in the first place.

You'll probably do best to contact the author of the code
(julien.delange () gmail com).

Brandon


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFHzDmOqaGPzAsl94IRAq25AJ9gli9FM4TI8QAZl0iDgs7gbHMkTQCfXtnd
DZnPyew12YDDIdq/omIpjsg=
=gKbr
-----END PGP SIGNATURE-----

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


Current thread: