Skip to content

Instantly share code, notes, and snippets.

@kx499-zz
kx499-zz / emotet_ioc.py
Created September 30, 2019 00:53
IOC Parsing
import re
import feedparser
import pprint
SHA256 = '[a-f0-9]{64}'
URL = 'https?://[^\s]+'
IP = '\d+\.\d+\.\d+\.\d+'
NAME = '\<h4 id="([^\"]+)"\>'
SECTION = '\<h4 id="[^\"]+"\>[\s\S]*?\<\/pre\>\<\/div\>\<\/div\>'
@kx499-zz
kx499-zz / sub.py
Created March 15, 2017 00:47
MISP ZeroMQ Sub
import zmq
# ZeroMQ Context
context = zmq.Context()
# Define the socket using the "Context"
sock = context.socket(zmq.SUB)
# Define subscription and messages with prefix to accept.
sock.setsockopt(zmq.SUBSCRIBE, "misp_json")