Example #1
0
# Call the specified query:
results=[]
if q == Queries.Queries_c:
	results.append( "Connection attempts:" )
	log_sum_c( log_sum_filterQueries( src, ["GET"] ), results )	# Allow only GET-queries.
elif q == Queries.Queries_2:
	results.append( "Connection attempts indicating success:" )
	log_sum_2( log_sum_filterQueries( src, ["GET"] ), results )	# Allow only GET-queries.
elif q == Queries.Queries_r:
	results.append( "Common response codes:" )
	log_sum_r( log_sum_filterQueries( src, httpQueries ), results )	# Allow all HTTP-queries.
elif q == Queries.Queries_F:
	results.append( "Common response codes indicating error:" )
	log_sum_F( log_sum_filterQueries( src, httpQueries ), results )	# Allow all HTTP-queries.
elif q == Queries.Queries_t:
	results.append( "IPs recieving the highest amount of bytes:" )
	log_sum_t( log_sum_filterQueries( src, httpQueries ), results )	# Allow all HTTP-queries.
elif q == Queries.Queries_f:
	results.append( "IPs sending the highest amount of bytes:" )
	log_sum_f( log_sum_filterQueries( src, ["PUT", "POST"] ), results )	# Allow only PUT- and POST-queries.

# Print results:
i = 0
for line in results:
	if i > printLimit:
		break
	print( line )
	i += 1

sys.exit( 0 )
Example #2
0
def log_sum_f(src, results):
    log_sum_t(src, results)
Example #3
0
def log_sum_f( src, results ):
	log_sum_t( src, results )