Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pox.lib.packet.ipv4 import ipv4
- import re
- class Cannon(object):
- def __init__ (self, target_domain_re, url_path_re, iframe_url):
- self.target_domain_re = target_domain_re
- self.url_path_re = url_path_re
- self.iframe_url = iframe_url
- # Input: an instance of ipv4 class
- # Output: an instance of ipv4 class or None
- def manipulate_packet (self, ip_packet):
- print "src = ", ip_packet.srcip
- print "dst = ", ip_packet.dstip
- # TODO
- # Must return an ip packet or None
- return ip_packet
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement