コード例 #1
0
ファイル: rtt_parser.py プロジェクト: GlobalSquare/pymdht
 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))
コード例 #2
0
ファイル: rtt_parser.py プロジェクト: fege/Thesis-Project
 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))
コード例 #3
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
コード例 #4
0
ファイル: maintenance_parser.py プロジェクト: Tribler/pymdht
    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
コード例 #5
0
ファイル: ping.py プロジェクト: fege/Thesis-Project
    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
コード例 #6
0
ファイル: ping.py プロジェクト: GlobalSquare/pymdht
    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
コード例 #7
0
ファイル: announce_peer.py プロジェクト: GlobalSquare/pymdht
    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
コード例 #8
0
ファイル: find_node.py プロジェクト: fege/Thesis-Project
    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
コード例 #9
0
ファイル: find_node.py プロジェクト: GlobalSquare/pymdht
    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
コード例 #10
0
ファイル: rtt_parser.py プロジェクト: fege/Thesis-Project
    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 = {}
コード例 #11
0
ファイル: ip_geo_locator.py プロジェクト: GlobalSquare/pymdht
    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)
コード例 #12
0
ファイル: rtt_parser.py プロジェクト: GlobalSquare/pymdht
    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 = {}
コード例 #13
0
ファイル: announce_peer.py プロジェクト: fege/Thesis-Project
    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
コード例 #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)
コード例 #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)
コード例 #16
0
ファイル: lookup_parser.py プロジェクト: GlobalSquare/pymdht
    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')
コード例 #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)
コード例 #18
0
ファイル: lookup_parser.py プロジェクト: ichorid/pymdht
    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')
コード例 #19
0
    def __init__(self, my_ip):
        self.my_ip = my_ip

        self.same_ip_file = openf('m.same_ip', 'w')
コード例 #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))
コード例 #21
0
ファイル: announce.py プロジェクト: fege/Thesis-Project
    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 = {}
コード例 #22
0
ファイル: multi_rtt.py プロジェクト: GlobalSquare/pymdht
 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))
コード例 #23
0
    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')
コード例 #24
0
ファイル: announce.py プロジェクト: csasm/pymdht
    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 = {}
コード例 #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))
コード例 #26
0
ファイル: same_ip.py プロジェクト: GlobalSquare/pymdht
    def __init__(self, my_ip):
        self.my_ip = my_ip

        self.same_ip_file = openf('m.same_ip', 'w')
コード例 #27
0
ファイル: multi_rtt.py プロジェクト: fege/Thesis-Project
 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))
コード例 #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()
コード例 #29
0
ファイル: traffic_multiparser.py プロジェクト: csasm/pymdht
    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()
コード例 #30
0
ファイル: traffic_multiparser.py プロジェクト: csasm/pymdht
 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))
コード例 #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
コード例 #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))