Anonymous | Login | 2024-12-03 12:31 EST |
Main | My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
0001841 | PacketFence | upstream | public | 2014-10-30 09:37 | 2015-03-04 12:05 | ||||||
Reporter | dwuelfrath | ||||||||||
Assigned To | dwuelfrath | ||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||||
Status | assigned | Resolution | open | ||||||||
Platform | OS | OS Version | |||||||||
Product Version | |||||||||||
Target Version | Fixed in Version | ||||||||||
Summary | 0001841: Issue with Nessus and Net::Nessus::XMLRPC | ||||||||||
Description | Some issues with Net::Nessus::XMLRPC upstream module may prevent Nessus scan succeed. Impacts: - Issue with SSL communication when a self-signed certificate is being used between PacketFence and the Nessus server (https) - Issue when trying to export the report Patch have been submitted but never merged. | ||||||||||
Additional Information | See the following bug: https://rt.cpan.org/Public/Bug/Display.html?id=78274 [^] Hi, i am using Net-Nessus-XMLRPC in the PacketFence project and i need nbe export. So i write the function to export in nbe format and in csv format too. For SSL i just add ssl_opts => { verify_hostname => 0 } to remove the SSL problem. Regards Fabrice Durand diff -ruN Net-Nessus-XMLRPC-0.30.ori/lib/Net/Nessus/XMLRPC.pm Net-Nessus-XMLRPC-0.30/lib/Net/Nessus/XMLRPC.pm --- Net-Nessus-XMLRPC-0.30.ori/lib/Net/Nessus/XMLRPC.pm 2010-05-21 12:16:45.000000000 -0400 +++ Net-Nessus-XMLRPC-0.30/lib/Net/Nessus/XMLRPC.pm 2012-07-09 10:09:53.795285182 -0400 @@ -126,10 +126,16 @@ =cut sub nessus_http_request { my ( $self, $uri, $post_data ) = @_; - my $ua = $self->{_ua}; - # my $ua = LWP::UserAgent->new; + #my $ua = $self->{_ua}; + my $ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => 0 }); my $furl = $self->nurl.$uri; - my $r = POST $furl, $post_data; + my $r =''; + if (not defined($post_data)) { + $r = GET $furl; + } + else { + $r = POST $furl, $post_data; + } my $result = $ua->request($r); # my $filename="n-".time; open (FILE,">$filename"); # print FILE $result->as_string; close (FILE); @@ -941,6 +947,50 @@ return $file; } +=head2 report_filenbe_download ($report_id) + +returns NBE report identified by $report_id (Nessus NBE) +=cut +sub report_filenbe_download { + my ( $self, $uuid ) = @_; + + my $post=[ + "token" => $self->token, + "report" => $uuid, + ]; + + my $get = $self->nessus_http_request("file/xslt/?report=".$uuid."&xslt=nbe.xsl&token=".$self->token); + sleep 10; + if($get =~ /<meta http-equiv="refresh" content="5;url=\/(.*)"/) { + my $file = $self->nessus_http_request($1."&token=".$self->token."&step=2"); + return $file; + } + + return $get; +} + +=head2 report_filecsv_download ($report_id) + +returns CSV report identified by $report_id (Nessus CSV) +=cut +sub report_filecsv_download { + my ( $self, $uuid ) = @_; + + my $post=[ + "token" => $self->token, + "report" => $uuid, + ]; + + my $get = $self->nessus_http_request("file/xslt/?report=".$uuid."&xslt=csv.xsl&token=".$self->token); + sleep 10; + if($get =~ /<meta http-equiv="refresh" content="5;url=\/(.*)"/) { + my $file = $self->nessus_http_request($1."&token=".$self->token."&step=2"); + return $file; + } + + return $get; +} + =head2 report_delete ($report_id) delete report identified by $report_id | ||||||||||
Tags | No tags attached. | ||||||||||
fixed in git revision | |||||||||||
fixed in mtn revision | |||||||||||
Attached Files | |||||||||||
Issue History | |||
Date Modified | Username | Field | Change |
2014-10-30 09:37 | dwuelfrath | New Issue | |
2014-10-30 09:41 | dwuelfrath | Additional Information Updated | View Revisions |
2015-03-04 12:05 | lmunro | Assigned To | => dwuelfrath |
2015-03-04 12:05 | lmunro | Status | new => assigned |
Copyright © 2000 - 2012 MantisBT Group |