/*
 * 
 * finger_cgi
 *
 * This plugin was written by Renaud Deraison and is released
 * under the GPL
 *
 */
#include <includes.h>

#define NAME "finger"
#define DESC "This plugins determines whether the 'finger' cgi is installed \
This cgi may lead to a denial of service of a remote server and may give \
some interesting informations to an intruder\n\
Risk factor : medium/high"
#define COPYRIGHT "no copyright"
#define SUMM "determines the presence of the 'finger' cgi"



PlugExport int plugin_init(struct arglist *desc);
PlugExport int plugin_init(struct arglist *desc)
{
	plug_set_name(desc, NAME);
	plug_set_description(desc, DESC);
	plug_set_summary(desc, SUMM);
	plug_set_copyright(desc, COPYRIGHT);
	plug_set_category(desc, ACT_GATHER_INFO);
	plug_set_family(desc, "CGI abuses");
	return(0);
}

PlugExport int plugin_run(struct arglist * args);	
PlugExport int plugin_run(struct arglist * args)
{
	
	if(host_get_port_state(args, 80)<=0)return(0);
	
	if((is_cgi_installed(args, "finger")))
	{
	post_info(args, 80, "The 'finger' cgi is present\n+ This may give away some\
 informations to an intruder\n+ This may lead to a denial of service");
	}
	return(0);
}

