121 #
122
123
# Include other scripts and library functions first
124 include("http_func.inc");
125
126
# Get initialization information from the KB or the target
127 port = get_kb_item("Services/www");
128 if ( !port ) port = 80;
129 if ( !get_port_state(port) ) exit(0);
130
131
if( safe_checks() ) {
132
133
# Nessus users can check the "Safe Checks Only" option
134 # when using Nessus to test critical hosts for known
135 # vulnerabilities. Implementing this section is optional,
136 # but highly recommended. Safe checks include banner
137 # grabbing, reading HTTP response messages, and the like.
138
139
# grab the banner
140 b = get_http_banner(port: port);
141
142
# check to see if the banner matches Apache/2.
143 if ( b =~ 'Server: *Apache/2\.' ) {
144 report = "