tree checksum vpatch file split hunks

all signers:

antecedents: 9990-keep-ephemeral-ports-open 9991-improved-logging

press order:

genesis
9992-handle-edge-cases-add-feedback
9991-improved-logging
9990-keep-ephemeral-ports-open
9989-show-wot-nicks

patch:

- 78E7BFF9012264C8334E1DF4D0D03A3EF609EF39330F1A3809DF3A8E3FB4FFC2C2E212F505CABB4A05DF90174D39CF5F085D71EC3F6BE1CD6745038BDA5BDFC1
+ 50ACEF42C77E18FB23FA8157201DDBA47717BB95AC85FE9D23393ABA847A39665373CC6C98FDBB08096F321081980F421C17ACD4490DE8CB56D38BEF637C0565
blatta/blatta
(30 . 6)(30 . 10)
5 metavar="X",
6 help="load the configfile from X")
7 op.add_option(
8 "-n", "--channel-name",
9 metavar="X",
10 help="specify the channel name for this Pest network")
11 op.add_option(
12 "-d", "--daemon",
13 action="store_true",
14 help="fork and become a daemon")
(84 . 6)(88 . 8)
16 " (requires root)")
17
18 (options, args) = op.parse_args(argv[1:])
19 if options.channel_name is None:
20 options.channel_name = "#pest"
21 if options.debug:
22 options.verbose = True
23 if options.irc_ports is None:
- 1FEA4F4A6A2C05324BA98DDF9615BED578E108A6E299A79A10EE5AD3748341F3DF42A4D68799CAD74655BE7AC8820669FC2BA15D72CC6EA6B325F345AD54393B
+ A35F64EE21532CC117FB36691ECE37E2F523CB01855FB4EB8268AC745519F27FD36ADDB324D56D4893FB7A84FE70302630E53BECF3571E250B3B578CA46ABCE3
blatta/lib/client.py
(48 . 7)(48 . 7)
28 return True
29
30 def get_prefix(self):
31 return "%s!%s@%s" % (self.nickname, self.user, self.host)
32 return "%s" % (self.nickname)
33 prefix = property(get_prefix)
34
35 def check_aliveness(self):
(217 . 8)(217 . 8)
37 self.reply("353 %s = %s :%s"
38 % (self.nickname,
39 channelname,
40 " ".join(sorted(x.nickname
41 for x in channel.members))))
42 " ".join(sorted(x
43 for x in self.server.state.get_peer_handles()))))
44 self.reply("366 %s %s :End of NAMES list"
45 % (self.nickname, channelname))
46
(490 . 6)(490 . 7)
48 try:
49 self.server.state.add_peer(arguments[0])
50 self.pest_reply("added new peer %s" % arguments[0])
51 self.message(":%s JOIN %s" % (arguments[0], self.server.channel_name))
52 except:
53 self.pest_reply("error attempting to add peer %s" % arguments[0])
54 else:
(500 . 6)(501 . 7)
56 try:
57 self.server.state.remove_peer(arguments[0])
58 self.pest_reply("removed peer %s" % arguments[0])
59 self.message(":%s PART %s" % (arguments[0], self.server.channel_name))
60 except Exception, e:
61 self.server.print_debug(e)
62 self.pest_reply("Error attempting to remove peer")
- E983984D664DAEF6D42FD55C86F784BFEAD4057B78673C18A8F8E85346DB539F3F3429DE5185A86805A1E698C2907441B5C2017E224BB1606358B930615CE84C
+ 25A41366C0D57C2FA6EAABA61E0BDB07E77B9F48D09FB7FEA1D65296FCC68C8B8836F954B13DE8EE071061A6F49BF8DB89E958EC7B961AC974926F5163694C21
blatta/lib/infosec.py
(138 . 15)(138 . 16)
67
68 nonce, bounces, version, command, message_bytes = struct.unpack(RED_PACKET_FORMAT, red_packet_bytes)
69
70 # nothing to be done for an IGNORE command
71
72 if command == IGNORE:
73 return Message({"error_code": IGNORED})
74
75 # unpack message
76
77 int_ts, self_chain, net_chain, speaker, message = struct.unpack(MESSAGE_PACKET_FORMAT, message_bytes)
78 speaker = speaker.strip()
79
80 # nothing to be done for an IGNORE command
81
82 if command == IGNORE:
83 return Message({"speaker": speaker, "error_code": IGNORED})
84
85
86 # check timestamp
87
- 7A172DDFD99E3C419BDCA866441AD222790353CA0EDDCB452B6D607E1998041AC0D61E8841D23E82D7C13E850CF7FF01BBFCBA5D1924169795A100C4674BBCB5
+ F36BF2D21B07D0A2E017B7C0A1F7C8784DED0A4539F2E6CB9DAC2B834F2909686B0AB3CFA28A64B35DB83C16018B049F99DA69B4EEB61EF238C5FE90555927E3
blatta/lib/server.py
(1 . 4)(1 . 4)
92 VERSION = "9990"
93 VERSION = "9989"
94
95 import os
96 import select
(36 . 6)(36 . 7)
98 def __init__(self, options):
99 self.irc_ports = options.irc_ports
100 self.udp_port = options.udp_port
101 self.channel_name = options.channel_name
102 self.password = options.password
103 self.motdfile = options.motd
104 self.verbose = options.verbose
(163 . 18)(164 . 7)
106 if(error_code == None):
107 self.print_debug("[%s] -> %s" % (peer.handles[0], message.body))
108
109 # we only update the address table if the speaker is same as peer
110
111 try:
112 idx = peer.handles.index(message.speaker)
113 except:
114 idx = None
115
116 if idx != None:
117 self.state.update_address_table({"handle": message.speaker,
118 "address": address[0],
119 "port": address[1]
120 })
121 self.conditionally_update_address_table(peer, message, address)
122 # send the message to all clients
123 for c in self.clients:
124 if (self.clients[c].is_addressed_to_me(message.body)):
(193 . 12)(183 . 26)
126 self.print_debug("[%s:%d] -> malformed packet: %s" % packet_info)
127 return
128 elif error_code == IGNORED:
129 self.conditionally_update_address_table(peer, message, address)
130 self.print_debug("[%s:%d] -> ignoring packet: %s" % packet_info)
131 return
132 elif error_code == INVALID_SIGNATURE:
133 pass
134 self.print_debug("[%s:%d] -> martian packet: %s" % packet_info)
135
136 # we only update the address table if the speaker is same as peer
137
138 def conditionally_update_address_table(self, peer, message, address):
139 try:
140 idx = peer.handles.index(message.speaker)
141 except:
142 idx = None
143
144 if idx != None:
145 self.state.update_address_table({"handle": message.speaker,
146 "address": address[0],
147 "port": address[1]
148 })
149 def peer_message(self, message):
150 message.original = True
151 if message.command == DIRECT:
- 7621F8A10842A06CBD590E6DC7460985C762458875771369D1707F24D6449021762A24277E9B1BBB017F5DF601219C8B80A38E6142861503EC7DC265F013A92A
+ CF7A79184DC4F229361A26A8DB0901BBCC915EC3C46C7D8A41177A5DDA82E50AACA1AB94C324239251EC1FC148B6C14CB9FB967D4EB08223FA6679D15BAC599A
blatta/lib/state.py
(175 . 6)(175 . 10)
156 return list(chain.from_iterable(self.cursor.execute("select handle_id from handles where peer_id=?",
157 (peer_id,)).fetchall()))
158
159 def get_peer_handles(self):
160 handles = list(chain.from_iterable(self.cursor.execute("select handle from handles").fetchall()))
161 return handles
162
163 def get_peers(self):
164 peers = []
165 handles = self.cursor.execute("select handle from handles").fetchall()
- 5256691880AA5D35F8534834AD318AFEFB85FE95B62E9AD41FE83C7DCE5D1E4BF4B1727B153492199C3567A77E65A4C36FB644AF046C74C0523511E263353D96
+ 10233FA2A74D0F92F3215B417140A9481F1263CEB7CA4486CCA97D48E9C112A36A9B66CB4F2C99A553626DEA431D6D8AE6D22735BD2535B8BDE7EA964A1F0B21
blatta/start_test_net.sh
(1 . 6)(1 . 6)
170 #!/bin/bash
171
172 # start 3 servers on different ports
173 ./blatta --debug --irc-port 6668 --udp-port 7778 --db-path a.db --address-table-path test_net_configs/a.py > logs/a &
174 ./blatta --debug --irc-port 6669 --udp-port 7779 --db-path b.db --address-table-path test_net_configs/b.py > logs/b &
175 ./blatta --debug --irc-port 6670 --udp-port 7780 --db-path c.db --address-table-path test_net_configs/c.py > logs/c &
176 ./blatta --debug --channel-name \#aleth --irc-port 6668 --udp-port 7778 --db-path a.db --address-table-path test_net_configs/a.py > logs/a &
177 ./blatta --debug --channel-name \#aleth --irc-port 6669 --udp-port 7779 --db-path b.db --address-table-path test_net_configs/b.py > logs/b &
178 ./blatta --debug --channel-name \#aleth --irc-port 6670 --udp-port 7780 --db-path c.db --address-table-path test_net_configs/c.py > logs/c &