📄 net-nessus-0.08.onms.patch
字号:
diff -Naur Net-Nessus-0.08/Makefile.PL Net-Nessus-0.08.onms/Makefile.PL--- Net-Nessus-0.08/Makefile.PL Fri Jan 29 15:15:39 1999+++ Net-Nessus-0.08.onms/Makefile.PL Fri Mar 29 14:14:26 2002@@ -98,14 +98,14 @@ ($cfg->{'nessus_host'} or 'localhost')); $cfg->{'nessus_port'} = prompt("Port number of Nessus server: ",- ($cfg->{'nessus_port'} or '3001'));+ ($cfg->{'nessus_port'} or '1241')); $cfg->{'nessus_user'} = prompt("Nessus user name: ",- ($cfg->{'nessus_user'} or 'none'));+ ($cfg->{'nessus_user'} or 'admin')); die "Nessus user name must be set" if $cfg->{'nessus_user'} eq 'none'; $cfg->{'nessus_password'} = prompt("Nessus password: ",- ($cfg->{'nessus_password'} or 'none'));+ ($cfg->{'nessus_password'} or 'password')); die "Nessus password must be set" if $cfg->{'nessus_password'} eq 'none'; require Data::Dumper;diff -Naur Net-Nessus-0.08/lib/Net/Nessus/Client.pm Net-Nessus-0.08.onms/lib/Net/Nessus/Client.pm--- Net-Nessus-0.08/lib/Net/Nessus/Client.pm Fri Jun 8 02:53:55 2001+++ Net-Nessus-0.08.onms/lib/Net/Nessus/Client.pm Fri Mar 29 15:42:27 2002@@ -107,7 +107,15 @@ =item ntp_proto An optional version of the NTP protocol to run. Defaults to the highest-available number, 1.1 as of this writing.+available number, 1.2 as of this writing. Version 1.2 is forced, currently.++=item ntp_opts++A space delimited, optional set of options to pass to the Nessus server +on initial connect. Does not have any defaults. Some available +options: md5_caching, plugins_version, plugins_cve_id, timestamps, dns.+Currently, plugins_version and plugins_cve_id are forced and cannot be+changed. =back @@ -130,8 +138,19 @@ my %attr = @_; my $host = $attr{'host'} or Carp::croak("Missing Nessus host");- my $port = $attr{'port'} || 3001;- my $proto = $attr{'ntp_proto'} || '1.1';+ my $port = $attr{'port'} || 1241;+ my $proto;+ if ( defined $attr{'ntp_proto'} ) {+ if ( $attr{'ntp_proto'} < 1.2 ) {+ Carp::croak("Versions less than 1.2 are not supported!");+ } else {+ $proto = $attr{'ntp_proto'};+ }+ } else {+ $proto = '1.2';+ }+ #my $proto_opts = $attr{'ntp_opts'} if (exists $attr{'ntp_opts'});+ my $proto_opts = 'plugins_cve_id plugins_version'; my $user = $attr{'user'} or Carp::croak("Missing user name"); my $pass = $attr{'password'} or Carp::croak("Missing password"); my $sock = $attr{'socket'} =@@ -145,8 +164,13 @@ 'Timeout' => ($attr{'Timeout'} || 300)) or Carp::croak("Cannot connect: $!"); - $sock->print("< NTP/$proto >")- or Carp::croak("Error while writing proto: $!");+ if (defined $proto_opts) {+ $sock->print("< NTP/$proto >< $proto_opts >")+ or Carp::croak("Error while writing proto options: $!");+ } else {+ $sock->print("< NTP/$proto >")+ or Carp::croak("Error while writing proto: $!");+ } my $line = $sock->getline(); die "Error while requesting NTP proto $proto: $!" unless defined($line); die "Protocol $proto not supported: $line"diff -Naur Net-Nessus-0.08/lib/Net/Nessus/Message.pm Net-Nessus-0.08.onms/lib/Net/Nessus/Message.pm--- Net-Nessus-0.08/lib/Net/Nessus/Message.pm Mon May 7 11:19:28 2001+++ Net-Nessus-0.08.onms/lib/Net/Nessus/Message.pm Fri Mar 29 15:43:12 2002@@ -240,7 +240,7 @@ that returns an array ref of hash refs, each of them having the attributes I<id>, I<name>, I<category>, I<copyright>, I<description>-I<summary> and I<family>.+I<summary>, I<family>, I<version>, and I<cve>. =cut @@ -262,6 +262,8 @@ 'description' => $line->[4], 'summary' => $line->[5], 'family' => $line->[6],+ 'version' => $line->[7],+ 'cve' => $line->[8], }; } }@@ -276,7 +278,9 @@ $_->{'copyright'}, $_->{'description'}, $_->{'summary'},- $_->{'family'}+ $_->{'family'},+ $_->{'version'},+ $_->{'cve'} ) } @{$self->{'lines'}}]) } sub Plugins { shift->{'lines'} }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -