X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=parsetrace%2Fsplit-trace.py;fp=parsetrace%2Fsplit-trace.py;h=caf77eecedc66c35b85b7b4e73d44babad16ba28;hb=9af190d3571bd1dbc6f58a20639863abb5b50fed;hp=e1ff68a7cad806cd84831043057c4aa3350ec665;hpb=4a16bafc74f36e1314a722544612ad7ac6a6cd05;p=bluesky.git diff --git a/parsetrace/split-trace.py b/parsetrace/split-trace.py index e1ff68a..caf77ee 100755 --- a/parsetrace/split-trace.py +++ b/parsetrace/split-trace.py @@ -7,7 +7,8 @@ import impacket, itertools, pcapy, re, socket, subprocess, sys import impacket.ImpactDecoder, impacket.ImpactPacket # Domain names for cloud service providers, whose traces we want to pull out. -DOMAINS = ['.amazon.com', '.core.windows.net'] +DOMAINS = ['.amazon.com', '.amazonaws.com', '.core.windows.net', + '204.246.162.', '87.238.86.'] # The collection of flows we've seen. The value associated with each flow is a # sequence number indicating in what order we saw the flows in the trace. @@ -53,7 +54,10 @@ for file in sys.argv[1:]: matches = False for d in DOMAINS: if name.endswith(d): matches = True - if not matches: continue + if name.startswith(d): matches = True + if not matches: + print "Host", name, "not recognized, skipping" + continue filter = "tcp and (host %s and host %s) and (port %d and port %d)" \ % (src, dst, sport, dport)