mirror of https://github.com/Cisco-Talos/clamav
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
592 B
24 lines
592 B
#!/usr/bin/env python
|
|
from popen2 import popen4;
|
|
import sys;
|
|
import os;
|
|
out = popen4("clamscan/clamscan -d database --phishing-strict-url-check --debug "+sys.argv[1])[0]
|
|
lines = out.read().split("\n")
|
|
PHISH_FOUND="Phishing found"
|
|
URL_CHECK="Checking url"
|
|
j=-1
|
|
for i in range(0,len(lines)):
|
|
if lines[i].find(PHISH_FOUND)!=-1:
|
|
j=i
|
|
break
|
|
|
|
if j!=-1:
|
|
print lines[j]
|
|
i=j
|
|
while lines[i].find(URL_CHECK)==-1:
|
|
i = i-1
|
|
for k in range(i,j):
|
|
print lines[k]
|
|
# os.system("TEMPFILE=`tempfile -s .eml` ; echo $TEMPFILE; cp "+sys.argv[1]+" $TEMPFILE; thunderbird $TEMPFILE")
|
|
else:
|
|
print "Clean"
|
|
|