December 2018
Intermediate to advanced
318 pages
8h 28m
English
We can also look for features that are usually found in malicious pages, such as the following:
We can search for these features using the following code:
def web_content_features(url): webfeatures={} total_count=0 try: source_code = str(opener.open(url)) webfeatures['src_html_cnt']=source_code.count('<html') webfeatures['src_hlink_cnt']=source_code.count('<a href=') webfeatures['src_iframe_cnt']=source_code.count('<iframe')
We can also count the number of suspicious JavaScript objects, as shown in the following list:
Read now
Unlock full access