[tor-bugs] #5047 [Obfsproxy]: Implement basic usage statistics in obfsproxy
Tor Bug Tracker & Wiki
torproject-admin at torproject.org
Sun Feb 12 09:15:21 UTC 2012
#5047: Implement basic usage statistics in obfsproxy
-------------------------+--------------------------------------------------
Reporter: karsten | Owner: karsten
Type: enhancement | Status: assigned
Priority: normal | Milestone:
Component: Obfsproxy | Version:
Keywords: | Parent:
Points: | Actualpoints:
-------------------------+--------------------------------------------------
Comment(by atagar):
Took a quick scan and looks good to me.
> locale_to_reqs[locale] = 8 * (int((len(locale_to_ip[locale]) + 7) / 8))
Is the extra int conversion really necessary? int / int = int
{{{
>>> foo = [1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> len(foo) / 8
1
>>> type(len(foo) / 8)
<type 'int'>
}}}
> print "hashed-fingerprint %s" % sha1(a2b_hex(fingerprint)).hexdigest()
Is this right? The fingerprint arg is already equal to...
{{{
fingerprint = sha1(a2b_hex(m.group(1))).hexdigest()
}}}
> ccnn = []
I haven't a clue what 'ccnn' stands for. It might be the convention with
some languages to abbreviate variables to cryptic and largely un-guessable
acronyms, but with python it's preferable to spell it out.
Cheers! -Damian
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5047#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list