Beispiel #1
0
 def done(self):
     self.l_q_r_wp_file = openf(self.label + '.l_q_r_wp', 'w')
     self.l_q_r_wp_file.write('%d\t%d\t%d\n' % (
             self.num_l_q, self.num_l_r, self.num_l_wport))
     self.m_q_r_wp_file = openf(self.label + '.m_q_r_wp', 'w') 
     self.m_q_r_wp_file.write('%d\t%d\t%d\n' % (
             self.num_m_q, self.num_m_r, self.num_m_wport))
Beispiel #2
0
 def done(self):
     self.l_q_r_wp_file = openf(self.label + '.l_q_r_wp', 'w')
     self.l_q_r_wp_file.write(
         '%d\t%d\t%d\n' % (self.num_l_q, self.num_l_r, self.num_l_wport))
     self.m_q_r_wp_file = openf(self.label + '.m_q_r_wp', 'w')
     self.m_q_r_wp_file.write(
         '%d\t%d\t%d\n' % (self.num_m_q, self.num_m_r, self.num_m_wport))
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr

        self.cum_l_queries_file = openf(label + '.cum_l_queries', 'w')
        self.cum_m_queries_file = openf(label + '.cum_m_queries', 'w')
        self.cum_l_queries = 0
        self.cum_m_queries = 0
        self.last_write_ts = 0

        self.sec_l_queries_file = openf(label + '.sec_l_queries', 'w')
        self.sec_m_queries_file = openf(label + '.sec_m_queries', 'w')
        self.sec_l_queries = 0
        self.sec_m_queries = 0
        self.current_sec = 0
Beispiel #4
0
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr

        self.cum_l_queries_file = openf(label + ".cum_l_queries", "w")
        self.cum_m_queries_file = openf(label + ".cum_m_queries", "w")
        self.cum_l_queries = 0
        self.cum_m_queries = 0
        self.last_write_ts = 0

        self.sec_l_queries_file = openf(label + ".sec_l_queries", "w")
        self.sec_m_queries_file = openf(label + ".sec_m_queries", "w")
        self.sec_l_queries = 0
        self.sec_m_queries = 0
        self.current_sec = 0
Beispiel #5
0
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr

        self.cum_ping_file = openf(label + '.cumulative_ping')
        self.sec_ping_file = openf(label + '.per_sec_ping')
        self.min_ping_file = openf(label + '.per_min_ping')
        self.hour_ping_file = openf(label + '.per_hour_ping')

        self.cum_ping = 0
        self.sec_ping = 0
        self.min_ping = 0
        self.hour_ping = 0
        self.current_sec = 0
        self.current_min = 0
        self.current_hour = 0
Beispiel #6
0
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr

        self.cum_ping_file = openf(label + '.cumulative_ping')
        self.sec_ping_file = openf(label + '.per_sec_ping')
        self.min_ping_file = openf(label + '.per_min_ping')
        self.hour_ping_file = openf(label + '.per_hour_ping')
        
	self.cum_ping = 0
        self.sec_ping = 0
        self.min_ping = 0
	self.hour_ping = 0
        self.current_sec = 0
        self.current_min = 0
	self.current_hour = 0
Beispiel #7
0
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr

        self.cum_announce_peer_file = openf(label + '.cumulative_announce_peer')
        self.sec_announce_peer_file = openf(label + '.per_sec_announce_peer')
        self.min_announce_peer_file = openf(label + '.per_min_announce_peer')
        self.hour_announce_peer_file = openf(label + '.per_hour_announce_peer')
        
	self.cum_announce_peer = 0
        self.sec_announce_peer = 0
        self.min_announce_peer = 0
	self.hour_announce_peer = 0
        self.current_sec = 0
        self.current_min = 0
	self.current_hour = 0
Beispiel #8
0
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr

        self.cum_find_node_file = openf(label + '.cumulative_find_node')
        self.sec_find_node_file = openf(label + '.per_sec_find_node')
        self.min_find_node_file = openf(label + '.per_min_find_node')
        self.hour_find_node_file = openf(label + '.per_hour_find_node')

        self.cum_find_node = 0
        self.sec_find_node = 0
        self.min_find_node = 0
        self.hour_find_node = 0
        self.current_sec = 0
        self.current_min = 0
        self.current_hour = 0
Beispiel #9
0
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr

        self.cum_find_node_file = openf(label + '.cumulative_find_node')
        self.sec_find_node_file = openf(label + '.per_sec_find_node')
        self.min_find_node_file = openf(label + '.per_min_find_node')
        self.hour_find_node_file = openf(label + '.per_hour_find_node')
        
	self.cum_find_node = 0
        self.sec_find_node = 0
        self.min_find_node = 0
	self.hour_find_node = 0
        self.current_sec = 0
        self.current_min = 0
	self.current_hour = 0
Beispiel #10
0
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr

        self.num_l_q = 0
        self.num_m_q = 0
        self.num_l_r = 0
        self.num_m_r = 0

        self.num_l_wport = 0
        self.num_m_wport = 0

        self.l_rtt_file = openf(label + '.l_rtt', 'w')
        self.m_rtt_file = openf(label + '.m_rtt', 'w')
        self.t_rtt_file = openf(label + '.t_rtt', 'w')

        self.tids = {}
Beispiel #11
0
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr

        self.geo_ip_file = openf(label + '.geo_ip')

        self.country_counter = {}
        self.gi = GeoIP.new(GeoIP.GEOIP_MEMORY_CACHE)
Beispiel #12
0
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr

        self.num_l_q = 0
        self.num_m_q = 0
        self.num_l_r = 0
        self.num_m_r = 0

        self.num_l_wport = 0
        self.num_m_wport = 0
        
        self.l_rtt_file = openf(label + '.l_rtt', 'w')
        self.m_rtt_file = openf(label + '.m_rtt', 'w')
        self.t_rtt_file = openf(label + '.t_rtt', 'w')

        self.tids = {}
Beispiel #13
0
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr

        self.cum_announce_peer_file = openf(label +
                                            '.cumulative_announce_peer')
        self.sec_announce_peer_file = openf(label + '.per_sec_announce_peer')
        self.min_announce_peer_file = openf(label + '.per_min_announce_peer')
        self.hour_announce_peer_file = openf(label + '.per_hour_announce_peer')

        self.cum_announce_peer = 0
        self.sec_announce_peer = 0
        self.min_announce_peer = 0
        self.hour_announce_peer = 0
        self.current_sec = 0
        self.current_min = 0
        self.current_hour = 0
Beispiel #14
0
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr

        self.geo_ip_file = openf(label + '.geo_ip')

        self.country_counter = {}
        self.gi = GeoIP.new(GeoIP.GEOIP_MEMORY_CACHE)
Beispiel #15
0
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr

        self.unique_geo_ip_file = openf(label + '.unique_geo_ip')

        self.unique_ip_list = set()
        self.ips_per_country = {}
        self.gi = GeoIP.new(GeoIP.GEOIP_MEMORY_CACHE)
Beispiel #16
0
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr
        self.lookups = {} # LookupInfo dictionary

        self.num_lookups_without_peeers = 0

        self.auth_time_file = openf(self.label + '.l_time_auth', 'w')
        self.closest_time_file = openf(self.label + '.l_time_closest', 'w')
        self.c_ld_file = openf(self.label + '.l_c_ld', 'w')
        self.time_file = openf(self.label + '.l_time', 'w')
        self.queries_file = openf(self.label + '.l_queries', 'w')
        self.peers_time_file = openf(self.label + '.l_peers_time', 'w')
        self.num_peers_file = openf(self.label + '.l_num_peers', 'w')
        self.num_nodes_file = openf(self.label + '.l_num_nodes', 'w')
        self.swarm_size_file = openf(self.label + '.l_swarm_size', 'w')
        self.queries_till_peers_file = openf(
            self.label + '.l_queries_till_peers', 'w')
Beispiel #17
0
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr

        self.unique_geo_ip_file = openf(label + ".unique_geo_ip")

        self.unique_ip_list = set()
        self.ips_per_country = {}
        self.gi = GeoIP.new(GeoIP.GEOIP_MEMORY_CACHE)
Beispiel #18
0
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr
        self.lookups = {}  # LookupInfo dictionary

        self.num_lookups_without_peeers = 0

        self.auth_time_file = openf(self.label + '.l_time_auth', 'w')
        self.closest_time_file = openf(self.label + '.l_time_closest', 'w')
        self.c_ld_file = openf(self.label + '.l_c_ld', 'w')
        self.time_file = openf(self.label + '.l_time', 'w')
        self.queries_file = openf(self.label + '.l_queries', 'w')
        self.peers_time_file = openf(self.label + '.l_peers_time', 'w')
        self.num_peers_file = openf(self.label + '.l_num_peers', 'w')
        self.num_nodes_file = openf(self.label + '.l_num_nodes', 'w')
        self.swarm_size_file = openf(self.label + '.l_swarm_size', 'w')
        self.queries_till_peers_file = openf(
            self.label + '.l_queries_till_peers', 'w')
Beispiel #19
0
    def __init__(self, my_ip):
        self.my_ip = my_ip

        self.same_ip_file = openf('m.same_ip', 'w')
Beispiel #20
0
 def done(self):
     self.t_rtt_file = openf('m.miner', 'w')
     for ip, port in self.ip_rtt.iteritems():
         self.t_rtt_file.write('%s %d\n' % (ip, port))
Beispiel #21
0
    def __init__(self, my_ip):
        self.my_ip = my_ip

        self.cum_in_file = openf('m.cum_in')
        self.cum_out_file = openf('m.cum_out')
        self.cum_in = 0
        self.cum_out = 0
        self.sec_in_file = openf('m.sec_in')
        self.sec_out_file = openf('m.sec_out')
        self.sec_in = 0
        self.sec_out = 0

        self.cum_q_in_file = openf('m.cum_q_in')
        self.cum_q_out_file = openf('m.cum_q_out')
        self.cum_q_in = 0
        self.cum_q_out = 0
        self.sec_q_in_file = openf('m.sec_q_in')
        self.sec_q_out_file = openf('m.sec_q_out')
        self.sec_q_in = 0
        self.sec_q_out = 0

        self.cum_r_in_file = openf('m.cum_r_in')
        self.cum_r_out_file = openf('m.cum_r_out')
        self.cum_r_in = 0
        self.cum_r_out = 0
        self.sec_r_in_file = openf('m.sec_r_in')
        self.sec_r_out_file = openf('m.sec_r_out')
        self.sec_r_in = 0
        self.sec_r_out = 0

        self.current_sec = 0
        self.last_write = 0

        self.versions = {}
        self.ips = set()

        self.announce_ips = set()

        self.num_announces = {}
        self.num_same_port = {}
Beispiel #22
0
 def done(self):
     self.t_rtt_file = openf('m.t_rtt', 'w')
     for rtt in self.ip_rtt.itervalues():
         self.t_rtt_file.write('%f\n' % (rtt))
    def __init__(self, label, my_addr):
        self.label = label
        self.my_addr = my_addr

        self.get_peer_announce_peer_file = openf(label + 
					'.get_peer_announce_peer')
Beispiel #24
0
    def __init__(self, my_ip):
        self.my_ip = my_ip

        self.cum_in_file = openf('m.cum_in')
        self.cum_out_file = openf('m.cum_out')
        self.cum_in = 0
        self.cum_out = 0
        self.sec_in_file = openf('m.sec_in')
        self.sec_out_file = openf('m.sec_out')
        self.sec_in = 0
        self.sec_out = 0

        self.cum_q_in_file = openf('m.cum_q_in')
        self.cum_q_out_file = openf('m.cum_q_out')
        self.cum_q_in = 0
        self.cum_q_out = 0
        self.sec_q_in_file = openf('m.sec_q_in')
        self.sec_q_out_file = openf('m.sec_q_out')
        self.sec_q_in = 0
        self.sec_q_out = 0

        self.cum_r_in_file = openf('m.cum_r_in')
        self.cum_r_out_file = openf('m.cum_r_out')
        self.cum_r_in = 0
        self.cum_r_out = 0
        self.sec_r_in_file = openf('m.sec_r_in')
        self.sec_r_out_file = openf('m.sec_r_out')
        self.sec_r_in = 0
        self.sec_r_out = 0

        self.current_sec = 0
        self.last_write = 0

        self.versions = {}
        self.ips = set()

        self.announce_ips = set()

        self.num_announces = {}
        self.num_same_port = {}
Beispiel #25
0
 def done(self):
     self.t_rtt_file = openf('m.miner', 'w')
     for ip, port in self.ip_rtt.iteritems():
         self.t_rtt_file.write('%s %d\n' % (ip, port))
Beispiel #26
0
    def __init__(self, my_ip):
        self.my_ip = my_ip

        self.same_ip_file = openf('m.same_ip', 'w')
Beispiel #27
0
 def done(self):
     self.t_rtt_file = openf('m.t_rtt', 'w')
     for rtt in self.ip_rtt.itervalues():
         self.t_rtt_file.write('%f\n' % (rtt))
Beispiel #28
0
    def __init__(self, my_ip):
        self.my_ip = my_ip

        self.cum_in_file = openf('m.cum_in', 'w')
        self.cum_out_file = openf('m.cum_out', 'w')
        self.cum_in = 0
        self.cum_out = 0
        self.sec_in_file = openf('m.sec_in', 'w')
        self.sec_out_file = openf('m.sec_out', 'w')
        self.sec_in = 0
        self.sec_out = 0

        self.cum_q_in_file = openf('m.cum_q_in', 'w')
        self.cum_q_out_file = openf('m.cum_q_out', 'w')
        self.cum_q_in = 0
        self.cum_q_out = 0
        self.sec_q_in_file = openf('m.sec_q_in', 'w')
        self.sec_q_out_file = openf('m.sec_q_out', 'w')
        self.sec_q_in = 0
        self.sec_q_out = 0

        self.cum_r_in_file = openf('m.cum_r_in', 'w')
        self.cum_r_out_file = openf('m.cum_r_out', 'w')
        self.cum_r_in = 0
        self.cum_r_out = 0
        self.sec_r_in_file = openf('m.sec_r_in', 'w')
        self.sec_r_out_file = openf('m.sec_r_out', 'w')
        self.sec_r_in = 0
        self.sec_r_out = 0

        self.current_sec = 0
        self.last_write = 0

        self.versions = {}
        self.ips = set()
Beispiel #29
0
    def __init__(self, my_ip):
        self.my_ip = my_ip

        self.cum_in_file = openf('m.cum_in', 'w')
        self.cum_out_file = openf('m.cum_out', 'w')
        self.cum_in = 0
        self.cum_out = 0
        self.sec_in_file = openf('m.sec_in', 'w')
        self.sec_out_file = openf('m.sec_out', 'w')
        self.sec_in = 0
        self.sec_out = 0

        self.cum_q_in_file = openf('m.cum_q_in', 'w')
        self.cum_q_out_file = openf('m.cum_q_out', 'w')
        self.cum_q_in = 0
        self.cum_q_out = 0
        self.sec_q_in_file = openf('m.sec_q_in', 'w')
        self.sec_q_out_file = openf('m.sec_q_out', 'w')
        self.sec_q_in = 0
        self.sec_q_out = 0

        self.cum_r_in_file = openf('m.cum_r_in', 'w')
        self.cum_r_out_file = openf('m.cum_r_out', 'w')
        self.cum_r_in = 0
        self.cum_r_out = 0
        self.sec_r_in_file = openf('m.sec_r_in', 'w')
        self.sec_r_out_file = openf('m.sec_r_out', 'w')
        self.sec_r_in = 0
        self.sec_r_out = 0

        self.current_sec = 0
        self.last_write = 0

        self.versions = {}
        self.ips = set()
Beispiel #30
0
 def done(self):
     num_ips = float(len(self.ips))
     v_file = openf('m.versions', 'w')
     v_file.write('%s\t%d\t%f\n' % ('ALL', num_ips, 1))
     for v, num_hits in self.versions.iteritems():
         v_file.write('%s\t%d\t%f\n' % (v, num_hits, num_hits/num_ips))
Beispiel #31
0
    def __init__(self, my_ip):
        self.my_ip = my_ip

        self.cum_in_file = openf('m.cum_in', 'w')
        self.cum_out_file = openf('m.cum_out', 'w')
        self.cum_in = 0
        self.cum_out = 0
        self.sec_in_file = openf('m.sec_in', 'w')
        self.sec_out_file = openf('m.sec_out', 'w')
        self.sec_in = 0
        self.sec_out = 0

        self.cum_q_in_file = openf('m.cum_q_in', 'w')
        self.cum_q_out_file = openf('m.cum_q_out', 'w')
        self.cum_q_in = 0
        self.cum_q_out = 0
        self.sec_q_in_file = openf('m.sec_q_in', 'w')
        self.sec_q_out_file = openf('m.sec_q_out', 'w')
        self.sec_q_in = 0
        self.sec_q_out = 0

        self.cum_r_in_file = openf('m.cum_r_in', 'w')
        self.cum_r_out_file = openf('m.cum_r_out', 'w')
        self.cum_r_in = 0
        self.cum_r_out = 0
        self.sec_r_in_file = openf('m.sec_r_in', 'w')
        self.sec_r_out_file = openf('m.sec_r_out', 'w')
        self.sec_r_in = 0
        self.sec_r_out = 0

        self.current_sec = 0
        self.last_write = 0

        self.versions = {}
        self.ips = set()

        self.announce_ips = set()

        self.num_announces = {}
        self.num_same_port = {}

        self.getpeers_infohashes = set()
        self.announced_infohashes = set()
        self.total_infohashes = set()
        self.last_ts = 0
        self.last_total = 0
Beispiel #32
0
 def done(self):
     num_ips = float(len(self.ips))
     v_file = openf('m.versions', 'w')
     v_file.write('%s\t%d\t%f\n' % ('ALL', num_ips, 1))
     for v, num_hits in self.versions.iteritems():
         v_file.write('%s\t%d\t%f\n' % (v, num_hits, num_hits/num_ips))