Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
extract iocs from urls
#!/usr/bin/env python2
# dependencies: pip install requests bs4 iocextract
# usage: python URL
import sys
import requests
import bs4
import iocextract
response = requests.get(sys.argv[1])
document = bs4.BeautifulSoup(response.content, 'html.parser')
for ioc in iocextract.extract_iocs(document.get_text(separator=' '), refang=True, strip=True):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.