diff --git a/ndiff/ndiff.py b/ndiff/ndiff.py index 01fdff7df..28e99da81 100755 --- a/ndiff/ndiff.py +++ b/ndiff/ndiff.py @@ -517,8 +517,8 @@ def host_pairs(a, b): class ScanDiff(object): - """An abtract class for different diff output types. Subclasses must define - various output methods.""" + """An abstract class for different diff output types. Subclasses must + define various output methods.""" def __init__(self, scan_a, scan_b, f=sys.stdout): """Create a ScanDiff from the "before" scan_a and the "after" scan_b.""" diff --git a/nping/nping-dev/ipv6fp.py b/nping/nping-dev/ipv6fp.py index e8c59813f..6167933e1 100755 --- a/nping/nping-dev/ipv6fp.py +++ b/nping/nping-dev/ipv6fp.py @@ -319,7 +319,7 @@ def print_parseable_sent_packet(test_number, test_packet, ip_version): else : print_and_store_line(tag + "={"+str(test_number)+", " + "0" +", " + hexstr(str(test_packet), onlyhex=1) + "}") -def print_parseable_time_dependant_test_result(test_number, response, ip_version): +def print_parseable_time_dependent_test_result(test_number, response, ip_version): if ip_version==4 : tag="timed4_result" else : @@ -353,7 +353,7 @@ def print_welcome_banner(): print " " print " We'd like to thank you in advance for running this tool. After " print " the execution has finished, a file with the following name " - print " will be sted in the working directory: " + print " will be created in the working directory: " print " " print output_file_name_g.center(65) print " " @@ -809,7 +809,7 @@ def filter_responses(sent, received): # If we get here (we have not "break"ed the loop), it means that we # did not find any standard response. Now check for ICMP errors. # We do a very soft matching. We can probably make mistakes here if - # we send many packets and we get many different resposnes, but this + # we send many packets and we get many different responses, but this # is not a common case in ipv6fp.py, so we should be fine. for i in range(0, len(response_set)) : @@ -839,7 +839,7 @@ def filter_responses(sent, received): if response_set[i][IPerror6].src==sent_probe.src: if response_set[i][IPerror6].dst==sent_probe.dst: if response_set[i][IPerror6].nh==sent_probe.nh: - print_debug("TimeExceede MATCH") + print_debug("TimeExceeded MATCH") final_results.append( [sent_probe, response_set[i]] ) match=response_set[i] break @@ -969,7 +969,7 @@ def sndrcv_ng(pkt, timeout=1, iface=None, inter = 0, verbose=1, retry=0, multi=0 elif pid < 0: print "ERROR: unable to fork()" - # Packet recption child + # Packet reception child else: print_debug("Reception Child") cap_pkts=sniff(timeout=timeout) @@ -1032,7 +1032,7 @@ def send_and_receive_eth(packet, verbosity=1): return responses -# Note that this function does NOT strip the ethernet header of the returned (answered, unsanswered) set. +# Note that this function does NOT strip the ethernet header of the returned (answered, unanswered) set. def send_and_receive_eth_multiple(packet, verbosity=1): # Send packet and get response @@ -1136,11 +1136,11 @@ def run_test_multiple(test_number_base, test_id, test_description, test_packet, if type(responses[0][i][1])==scapy.layers.l2.Ether : print_received_packet(responses[0][i][1].payload) myresponses.append(responses[0][i][1].payload) - print_parseable_time_dependant_test_result(test_number_base+i, responses[0][i][1].payload, ip_version) + print_parseable_time_dependent_test_result(test_number_base+i, responses[0][i][1].payload, ip_version) else: print_received_packet(responses[0][i][1]) myresponses.append(responses[0][i][1]) - print_parseable_time_dependant_test_result(test_number_base+i, responses[0][i][1], ip_version) + print_parseable_time_dependent_test_result(test_number_base+i, responses[0][i][1], ip_version) # Cleanup and return print_end_separator() @@ -1714,7 +1714,7 @@ def set_up_ipv6_tests(target): # TEST 42 test6_ids.append("ICMP_NI_Query_0") - test6_descriptions.append("ICMP/NI Query NOOP/Dst=target/IMCP Code=1, Payload='.' (root) in DNS format") + test6_descriptions.append("ICMP/NI Query NOOP/Dst=target/ICMP Code=1, Payload='.' (root) in DNS format") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryNOOP() icmp_packet.code=1 # RFC: On transmission, the ICMPv6 Code in a NOOP Query must be set to 1 @@ -1728,7 +1728,7 @@ def set_up_ipv6_tests(target): # TEST 43 test6_ids.append("ICMP_NI_Query_1") - test6_descriptions.append("ICMP/NI Query NOOP/Dst=target/IMCP Code=1, Payload=localhost (in DNS format)") + test6_descriptions.append("ICMP/NI Query NOOP/Dst=target/ICMP Code=1, Payload=localhost (in DNS format)") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryNOOP() icmp_packet.code=1 # RFC: On transmission, the ICMPv6 Code in a NOOP Query must be set to 1 @@ -1742,7 +1742,7 @@ def set_up_ipv6_tests(target): # TEST 44 test6_ids.append("ICMP_NI_Query_2") - test6_descriptions.append("ICMP/NI Query NOOP/Dst=target/IMCP Code=1, Payload=Bogus DNS formatted name (label length>63)") + test6_descriptions.append("ICMP/NI Query NOOP/Dst=target/ICMP Code=1, Payload=Bogus DNS formatted name (label length>63)") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryNOOP() icmp_packet.code=1 # RFC: On transmission, the ICMPv6 Code in a NOOP Query must be set to 1 @@ -1756,7 +1756,7 @@ def set_up_ipv6_tests(target): # TEST 45 test6_ids.append("ICMP_NI_Query_3") - test6_descriptions.append("ICMP/NI Query NOOP/Dst=target/IMCP Code=1, Payload=Bogus DNS formatted name (Characters missing)") + test6_descriptions.append("ICMP/NI Query NOOP/Dst=target/ICMP Code=1, Payload=Bogus DNS formatted name (Characters missing)") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryNOOP() icmp_packet.code=1 # RFC: On transmission, the ICMPv6 Code in a NOOP Query must be set to 1 @@ -1770,7 +1770,7 @@ def set_up_ipv6_tests(target): # TEST 46 test6_ids.append("ICMP_NI_Query_4") - test6_descriptions.append("ICMP/NI Query NOOP/Dst=target/IMCP Code=0, Subject Addr=::0") + test6_descriptions.append("ICMP/NI Query NOOP/Dst=target/ICMP Code=0, Subject Addr=::0") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryNOOP() icmp_packet.code=0 # This is forbidden by RFC 4620 @@ -1784,7 +1784,7 @@ def set_up_ipv6_tests(target): # TEST 47 test6_ids.append("ICMP_NI_Query_5") - test6_descriptions.append("ICMP/NI Query NOOP/Dst=target/IMCP Code=0, Subject Addr=target's") + test6_descriptions.append("ICMP/NI Query NOOP/Dst=target/ICMP Code=0, Subject Addr=target's") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryNOOP() icmp_packet.code=0 # IPv6 Address. Using this in NOOP is forbidden by RFC 4620 @@ -1798,7 +1798,7 @@ def set_up_ipv6_tests(target): # TEST 48 test6_ids.append("ICMP_NI_Query_6") - test6_descriptions.append("ICMP/NI Query NOOP/Dst=target/IMCP Code=0xAB (unknown), Payload=0x00") + test6_descriptions.append("ICMP/NI Query NOOP/Dst=target/ICMP Code=0xAB (unknown), Payload=0x00") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryNOOP() icmp_packet.code=0xAB # This one is also forbidden by RFC 4620 @@ -1812,7 +1812,7 @@ def set_up_ipv6_tests(target): # TEST 49 test6_ids.append("ICMP_NI_Query_7") - test6_descriptions.append("ICMP/NI Query Unused/Dst=target/IMCP Code=1, Payload=localhost") + test6_descriptions.append("ICMP/NI Query Unused/Dst=target/ICMP Code=1, Payload=localhost") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryNOOP() icmp_packet.code=1 # DNS name @@ -1826,7 +1826,7 @@ def set_up_ipv6_tests(target): # TEST 50 test6_ids.append("ICMP_NI_Query_8") - test6_descriptions.append("ICMP/NI Query Unused/Dst=target/IMCP Code=0, Payload=target's addr") + test6_descriptions.append("ICMP/NI Query Unused/Dst=target/ICMP Code=0, Payload=target's addr") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryNOOP() icmp_packet.code=0 # IPv6 Address @@ -1840,7 +1840,7 @@ def set_up_ipv6_tests(target): # TEST 51 test6_ids.append("ICMP_NI_Query_9") - test6_descriptions.append("ICMP/NI Query Node Name/Dst=target/IMCP Code=1, Name=localhost") + test6_descriptions.append("ICMP/NI Query Node Name/Dst=target/ICMP Code=1, Name=localhost") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryName() icmp_packet.code=1 # DNS Name @@ -1854,7 +1854,7 @@ def set_up_ipv6_tests(target): # TEST 52 test6_ids.append("ICMP_NI_Query_10") - test6_descriptions.append("ICMP/NI Query Node Name/Dst=target/IMCP Code=0, Addr=target's") + test6_descriptions.append("ICMP/NI Query Node Name/Dst=target/ICMP Code=0, Addr=target's") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryName() icmp_packet.code=0 # IPv6 Addr @@ -1868,7 +1868,7 @@ def set_up_ipv6_tests(target): # TEST 53 test6_ids.append("ICMP_NI_Query_11") - test6_descriptions.append("ICMP/NI Query Node Addresses IPv6/Dst=target/IMCP Code=0, Addr=target's, Flags=All addresses") + test6_descriptions.append("ICMP/NI Query Node Addresses IPv6/Dst=target/ICMP Code=0, Addr=target's, Flags=All addresses") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryIPv6() icmp_packet.code=0 # IPv6 Addr @@ -1882,7 +1882,7 @@ def set_up_ipv6_tests(target): # TEST 54 test6_ids.append("ICMP_NI_Query_12") - test6_descriptions.append("ICMP/NI Query Node Addresses IPv6/Dst=target/IMCP Code=0, Addr=target's, Flags=None") + test6_descriptions.append("ICMP/NI Query Node Addresses IPv6/Dst=target/ICMP Code=0, Addr=target's, Flags=None") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryIPv6() icmp_packet.code=0 # IPv6 Addr @@ -1896,7 +1896,7 @@ def set_up_ipv6_tests(target): # TEST 55 test6_ids.append("ICMP_NI_Query_13") - test6_descriptions.append("ICMP/NI Query Node Addresses IPv6/Dst=target/IMCP Code=0, Name=localhost, Flags=All") + test6_descriptions.append("ICMP/NI Query Node Addresses IPv6/Dst=target/ICMP Code=0, Name=localhost, Flags=All") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryIPv6() icmp_packet.code=1 # DNS Name @@ -1910,7 +1910,7 @@ def set_up_ipv6_tests(target): # TEST 56 test6_ids.append("ICMP_NI_Query_14") - test6_descriptions.append("ICMP/NI Query Node Addresses IPv4/Dst=target/IMCP Code=0, Name=localhost, Flags='A'") + test6_descriptions.append("ICMP/NI Query Node Addresses IPv4/Dst=target/ICMP Code=0, Name=localhost, Flags='A'") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryIPv4() icmp_packet.code=1 # DNS Name @@ -1924,7 +1924,7 @@ def set_up_ipv6_tests(target): # TEST 57 test6_ids.append("ICMP_NI_Query_15") - test6_descriptions.append("ICMP/NI Query Node Addresses IPv4/Dst=target/IMCP Code=0, Addr=target's, Flags='A'") + test6_descriptions.append("ICMP/NI Query Node Addresses IPv4/Dst=target/ICMP Code=0, Addr=target's, Flags='A'") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryIPv4() icmp_packet.code=0 # IPv6 Addr @@ -1938,7 +1938,7 @@ def set_up_ipv6_tests(target): # TEST 58 test6_ids.append("ICMP_NI_Query_16") - test6_descriptions.append("ICMP/NI Query Bogus Op code/Dst=target/IMCP Code=0, Addr=target's") + test6_descriptions.append("ICMP/NI Query Bogus Op code/Dst=target/ICMP Code=0, Addr=target's") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryNOOP() icmp_packet.code=0 # IPv6 Addr @@ -1952,7 +1952,7 @@ def set_up_ipv6_tests(target): # TEST 59 test6_ids.append("ICMP_NI_Query_17") - test6_descriptions.append("ICMP/NI Query Bogus Op code/Dst=target/IMCP Code=Bogus") + test6_descriptions.append("ICMP/NI Query Bogus Op code/Dst=target/ICMP Code=Bogus") ip_packet=build_default_ipv6(target) icmp_packet=ICMPv6NIQueryNOOP() icmp_packet.code=0xFB # Bogus @@ -1985,7 +1985,7 @@ def set_up_ipv6_tests(target): test6_descriptions.append("IPv6/ExtHdr DestOpts {Opts Empty} / No next Header") ip_packet=build_default_ipv6(target) ext_hdr=IPv6ExtHdrDestOpt() - ext_hdr.nh=59 # No Next HEader + ext_hdr.nh=59 # No Next Header final_packet=ip_packet/ext_hdr test6_packets.append(final_packet) @@ -2380,7 +2380,7 @@ def set_up_ipv6_tests(target): frag_hdr_2.offset=1 # 1=8 octets frag_hdr_2.id=0x34567812 frag_hdr_2.nh=58 # ICMPv6 - payload="\xFF\xFF\x00\x00"*10 # Checksum collision (sabe cksum as "\x00\x00\xFF\xFF"*10 ) + payload="\xFF\xFF\x00\x00"*10 # Checksum collision (same cksum as "\x00\x00\xFF\xFF"*10 ) final_packet_2=ip_packet_2/frag_hdr_2/payload finals_t88=[final_packet_1, final_packet_2] test6_packets.append(finals_t88) @@ -2588,7 +2588,7 @@ def set_up_ipv6_tests(target): # # Code: 0 # Pointer: high-order octet of the IPv6 Payload Length - test6_descriptions.append("IPv6 with PLEN=0/Hop-by-hop withotu Jumbo Payload") + test6_descriptions.append("IPv6 with PLEN=0/Hop-by-hop without Jumbo Payload") ip_packet=build_default_ipv6(target) ext_1=IPv6ExtHdrHopByHop() icmp_packet=build_default_icmpv6() @@ -3597,7 +3597,7 @@ def run_all_tests(target6, target4, from_test, to_test): test4_replies.append(res) time.sleep(inter_test_delay_g) # Wait for a bit before the next test -def run_timing_dependant_tests() : +def run_timing_dependent_tests() : global inter_packet_delay_g # Select the appropriate packets @@ -3609,9 +3609,9 @@ def run_timing_dependant_tests() : inter_packet_delay_g=0.1 # 100ms if target_host6_g!=None : - run_test_multiple(1000, "IPv6_NmapProbes_100ms", "Time dependant IPv6 probes", packets6, 6) + run_test_multiple(1000, "IPv6_NmapProbes_100ms", "Time dependent IPv6 probes", packets6, 6) if target_host4_g!=None : - run_test_multiple(2000, "IPv4_NmapProbes_100ms", "Time dependant IPv4 probes", packets4, 4) + run_test_multiple(2000, "IPv4_NmapProbes_100ms", "Time dependent IPv4 probes", packets4, 4) # Restore original inter packet delay inter_packet_delay_g=ipdbak @@ -3958,7 +3958,7 @@ def test_connectivity(): icmp_packet=ICMPv6EchoRequest() final_packets=[ip_packet1/tcp_packet, ip_packet2/icmp_packet] # Send the packet and listen for responses - sys.stdout.write("[+] IPv6 conectivity: ") + sys.stdout.write("[+] IPv6 connectivity: ") sys.stdout.flush() if send_eth_g == True: response6=send_and_receive_eth(final_packets, verbosity=0) @@ -3990,7 +3990,7 @@ def test_connectivity(): icmp_packet=ICMP(type=8) final_packets=[ip_packet1/tcp_packet, ip_packet2/icmp_packet] # Send the packet and listen for responses - sys.stdout.write("[+] IPv4 conectivity: ") + sys.stdout.write("[+] IPv4 connectivity: ") sys.stdout.flush() if send_eth_g == True: response4=send_and_receive_eth(final_packets, verbosity=0) @@ -4086,9 +4086,9 @@ def main(): # Run main the tests run_all_tests(target_host6_g, target_host4_g, first_test_g, last_test_g+1) - # Run time dependant tests only when all others are requested + # Run time dependent tests only when all others are requested if first_test_g==0 and last_test_g> len(test6_ids) : - run_timing_dependant_tests() # Nmap OS probes that are sent 100ms apart + run_timing_dependent_tests() # Nmap OS probes that are sent 100ms apart # Build result vectors build_result_vector6() diff --git a/zenmap/install_scripts/macosx/zenmap_wrapper.py b/zenmap/install_scripts/macosx/zenmap_wrapper.py index adc629cf9..574cc1af7 100755 --- a/zenmap/install_scripts/macosx/zenmap_wrapper.py +++ b/zenmap/install_scripts/macosx/zenmap_wrapper.py @@ -31,7 +31,7 @@ def create_dir(path): # The format of pango/pangorc is called "key file." It's described at # http://library.gnome.org/devel/glib/stable/glib-Key-value-file-parser. -# Escape a string as approprite for a "key file." +# Escape a string as appropriate for a "key file." def escape_key_file_value(value): result = [] for c in value: @@ -82,7 +82,7 @@ def hack_xinitrc(system_xinitrc_filename, home_xinitrc_filename): system_xinitrc = open(system_xinitrc_filename, "r") home_xinitrc = open(home_xinitrc_filename, "w") lines = iter(system_xinitrc) - # Look for the first non-comment line so we don't pre-empt the #! line. + # Look for the first non-comment line so we don't preempt the #! line. for line in lines: if not line.lstrip().startswith("#"): break diff --git a/zenmap/radialnet/bestwidgets/comboboxes.py b/zenmap/radialnet/bestwidgets/comboboxes.py index f82cd1b54..13eb12cdb 100644 --- a/zenmap/radialnet/bestwidgets/comboboxes.py +++ b/zenmap/radialnet/bestwidgets/comboboxes.py @@ -144,7 +144,7 @@ class BWChangeableComboBoxEntry(gtk.ComboBoxEntry): if self.get_active() != -1: self.__last_active = self.get_active() - def bw_get_lenght(self): + def bw_get_length(self): """ """ return len(self.__liststore) diff --git a/zenmap/radialnet/core/Interpolation.py b/zenmap/radialnet/core/Interpolation.py index 9dc285c68..7bf188f33 100644 --- a/zenmap/radialnet/core/Interpolation.py +++ b/zenmap/radialnet/core/Interpolation.py @@ -122,7 +122,7 @@ class Linear2DInterpolator: """ - Implements a bidimesional linear interpolator. + Implements a bidimensional linear interpolator. """ def __init__(self): diff --git a/zenmap/radialnet/gui/RadialNet.py b/zenmap/radialnet/gui/RadialNet.py index 6efef617c..0644c2a4d 100644 --- a/zenmap/radialnet/gui/RadialNet.py +++ b/zenmap/radialnet/gui/RadialNet.py @@ -1088,9 +1088,9 @@ class RadialNet(gtk.DrawingArea): def __draw_node(self, context, node): """ - Draw nodes and your informations + Draw nodes and your information @type : NetNode - @param : The node will be draw + @param : The node to be drawn """ x, y = node.get_cartesian_coordinate() xc, yc = self.__center_of_widget @@ -1234,9 +1234,9 @@ class RadialNet(gtk.DrawingArea): """ distance = abs(self.__fisheye_ring - ring) level_of_detail = self.__ring_gap * self.__fisheye_interest - spreaded_distance = distance - distance * self.__fisheye_spread + spread_distance = distance - distance * self.__fisheye_spread - value = level_of_detail / (spreaded_distance + 1) + value = level_of_detail / (spread_distance + 1) if value < self.__min_ring_gap: value = self.__min_ring_gap diff --git a/zenmap/zenmapCore/NetworkInventory.py b/zenmap/zenmapCore/NetworkInventory.py index c065a2fde..106af6dce 100644 --- a/zenmap/zenmapCore/NetworkInventory.py +++ b/zenmap/zenmapCore/NetworkInventory.py @@ -257,7 +257,7 @@ class NetworkInventory(object): #remove ports which are no longer up if old_date < new_date: for defunct_port in old_list: - #Check if defunt_port is in ports and that the protocol matches + #Check if defunct_port is in ports and that the protocol matches port_number = int(defunct_port['portid']) if port_number in ports: if defunct_port['protocol'] in ports[port_number]: @@ -664,7 +664,7 @@ class FilteredNetworkInventoryTest(unittest.TestCase): class PortChangeTest(unittest.TestCase): def test_port(self): - """Verify that the port status (open/filtered/closed) is diplayed """ \ + """Verify that the port status (open/filtered/closed) is displayed """ \ """correctly when the port status changes in newer scans""" from zenmapCore.NmapParser import NmapParser inv = NetworkInventory() diff --git a/zenmap/zenmapCore/NmapOptions.py b/zenmap/zenmapCore/NmapOptions.py index 7e80035ff..5e8a3a19b 100644 --- a/zenmap/zenmapCore/NmapOptions.py +++ b/zenmap/zenmapCore/NmapOptions.py @@ -84,7 +84,7 @@ class option: """A single option, part of a pool of potential options. It's just a name - and a flag saying if the option takes no argument, if an agument is + and a flag saying if the option takes no argument, if an argument is optional, or if an argument is required.""" NO_ARGUMENT = 0 REQUIRED_ARGUMENT = 1 diff --git a/zenmap/zenmapCore/NmapParser.py b/zenmap/zenmapCore/NmapParser.py index 6f6b103df..1f818ad9e 100644 --- a/zenmap/zenmapCore/NmapParser.py +++ b/zenmap/zenmapCore/NmapParser.py @@ -907,7 +907,7 @@ class NmapParserSAX(ParserBasics, ContentHandler): def _parsing(self, attrs, unique_names, other_names): # Returns a dict with the attributes of a given tag with the - # atributes names as keys and their respective values + # attributes names as keys and their respective values dic = {} for at in unique_names: dic[at] = unique(attrs.get(at, "")) @@ -1262,7 +1262,7 @@ class NmapParserSAX(ParserBasics, ContentHandler): writer.endElement("uptime") ##################### - # Sequences elementes + # Sequences elements ## TCP Sequence element # Cannot use dict() here, because of the 'class' attribute. writer.startElement("tcpsequence", diff --git a/zenmap/zenmapCore/RecentScans.py b/zenmap/zenmapCore/RecentScans.py index 48161e2e6..173e69d74 100644 --- a/zenmap/zenmapCore/RecentScans.py +++ b/zenmap/zenmapCore/RecentScans.py @@ -130,17 +130,17 @@ class RecentScans(object): self.temp_list = [] try: - self.recents_scans_file = Path.recent_scans + self.recent_scans_file = Path.recent_scans except: - self.recents_scans_file = False + self.recent_scans_file = False - if self.recents_scans_file and \ - (access(self.recents_scans_file, R_OK and W_OK) or \ - access(dirname(self.recents_scans_file), R_OK and W_OK)): + if self.recent_scans_file and \ + (access(self.recent_scans_file, R_OK and W_OK) or \ + access(dirname(self.recent_scans_file), R_OK and W_OK)): self.using_file = True # Recovering saved targets - recent_file = open(self.recents_scans_file, "r") + recent_file = open(self.recent_scans_file, "r") self.temp_list = [t for t in recent_file.read().split(";") \ if t != "" and t != "\n"] recent_file.close() @@ -149,7 +149,7 @@ class RecentScans(object): def save(self): if self.using_file: - recent_file = open(self.recents_scans_file, "w") + recent_file = open(self.recent_scans_file, "w") recent_file.write(";".join(self.temp_list)) recent_file.close() diff --git a/zenmap/zenmapCore/UmitDB.py b/zenmap/zenmapCore/UmitDB.py index cd0b42f54..a5ca2513a 100644 --- a/zenmap/zenmapCore/UmitDB.py +++ b/zenmap/zenmapCore/UmitDB.py @@ -175,7 +175,7 @@ if isinstance(umitdb, str): fs_enc = "UTF-8" umitdb = umitdb.decode(fs_enc) -# pyslite 2.4.0 doesn't handle a unicode database name, though earlier and +# pysqlite 2.4.0 doesn't handle a unicode database name, though earlier and # later versions do. Encode to UTF-8 as pysqlite would do internally anyway. umitdb = umitdb.encode("UTF-8") @@ -183,7 +183,7 @@ connection = sqlite.connect(umitdb) # By default pysqlite will raise an OperationalError when trying to return a # TEXT data type that is not UTF-8 (it always tries to decode text in order to -# return a unicdoe object). We store XML in the database, which may have a +# return a unicode object). We store XML in the database, which may have a # different encoding, so instruct pysqlite to return a plain str for TEXT data # types, and not to attempt any decoding. try: @@ -292,7 +292,7 @@ class UmitDB(object): def cleanup(self, save_time): log.debug(">>> Cleaning up data base.") - log.debug(">>> Removing results olders than %s seconds" % save_time) + log.debug(">>> Removing results older than %s seconds" % save_time) self.cursor.execute("SELECT scans_id FROM scans WHERE date < ?", (time() - save_time,)) diff --git a/zenmap/zenmapCore/UmitOptionParser.py b/zenmap/zenmapCore/UmitOptionParser.py index 78f9f3540..6239c264f 100644 --- a/zenmap/zenmapCore/UmitOptionParser.py +++ b/zenmap/zenmapCore/UmitOptionParser.py @@ -238,7 +238,7 @@ used more than once to get even more verbosity")) def get_target(self): """Returns a string with the target specified, or False if this option - wass not called by the user""" + was not called by the user""" return self.options.target def get_open_results(self): diff --git a/zenmap/zenmapGUI/OptionBuilder.py b/zenmap/zenmapGUI/OptionBuilder.py index a86533a9f..30916595c 100644 --- a/zenmap/zenmapGUI/OptionBuilder.py +++ b/zenmap/zenmapGUI/OptionBuilder.py @@ -307,7 +307,7 @@ class TargetEntry(gtk.Entry): def update(self): self.set_text(u" ".join(self.ops.target_specs)) - def changed_cb(self, eidget): + def changed_cb(self, widget): self.ops.target_specs = self.get_targets() def get_targets(self): diff --git a/zenmap/zenmapGUI/ScanInterface.py b/zenmap/zenmapGUI/ScanInterface.py index fca7231d9..84ee4414e 100644 --- a/zenmap/zenmapGUI/ScanInterface.py +++ b/zenmap/zenmapGUI/ScanInterface.py @@ -783,7 +783,7 @@ class ScanInterface(HIGVBox): def host_selection_changed(self, widget): self.refresh_port_output() - # Switch nmap output to show first host occourrence + # Switch nmap output to show first host occurrence model, selection = self.host_view_selection.get_selected_rows() for path in selection: self.go_to_host(model[path][2]) diff --git a/zenmap/zenmapGUI/ScanNmapOutputPage.py b/zenmap/zenmapGUI/ScanNmapOutputPage.py index 50a553d8e..a66433dae 100644 --- a/zenmap/zenmapGUI/ScanNmapOutputPage.py +++ b/zenmap/zenmapGUI/ScanNmapOutputPage.py @@ -228,7 +228,7 @@ class ScanNmapOutputPage(HIGVBox): self._update() def set_active_iter(self, i): - """Set the active entry to an interator into the ScansListStore + """Set the active entry to an iterator into the ScansListStore referred to by this object.""" self.scans_list.set_active_iter(i) diff --git a/zenmap/zenmapGUI/ScriptInterface.py b/zenmap/zenmapGUI/ScriptInterface.py index 86a2cd2d4..10f9abac1 100644 --- a/zenmap/zenmapGUI/ScriptInterface.py +++ b/zenmap/zenmapGUI/ScriptInterface.py @@ -238,7 +238,7 @@ class ScriptInterface: self.current_arguments = [] self.set_help_texts() self.prev_script_spec = None - self.focussedentry = None + self.focusedentry = None self.liststore = gtk.ListStore(str, "gboolean", object) @@ -677,7 +677,7 @@ clicking in the value field beside the argument name.""") self.set_description(entry) self.populate_arg_list(entry) # Remember the currently pointing script entry - self.focussedentry = entry + self.focusedentry = entry def update_help_ls_cb(self, widget, extra): # list of scripts """Callback method to display the help for the list of scripts.""" @@ -696,7 +696,7 @@ clicking in the value field beside the argument name.""") # convert_widget_to_bin_window_coords was introduced in PyGTK 2.12. return path = treeview.get_path_at_pos(x, y) - if not path or not self.focussedentry: + if not path or not self.focusedentry: self.help_buf.set_text("") return path = path[0] diff --git a/zenmap/zenmapGUI/higwidgets/__init__.py b/zenmap/zenmapGUI/higwidgets/__init__.py index bc615ab06..a3a3a308e 100644 --- a/zenmap/zenmapGUI/higwidgets/__init__.py +++ b/zenmap/zenmapGUI/higwidgets/__init__.py @@ -127,7 +127,7 @@ This module implements GTK Widgets that try their best to adhere to the GNOME Human Interface Guidelines (aka HIG). This is mostly implemented by subclassing from the GTK classes, and -providing defaults that better match the HIG specifications/recomendations. +providing defaults that better match the HIG specifications/recommendations. """ from gtkutils import * diff --git a/zenmap/zenmapGUI/higwidgets/higdialogs.py b/zenmap/zenmapGUI/higwidgets/higdialogs.py index abaa35c74..cf6da60b9 100644 --- a/zenmap/zenmapGUI/higwidgets/higdialogs.py +++ b/zenmap/zenmapGUI/higwidgets/higdialogs.py @@ -148,7 +148,7 @@ class HIGAlertDialog(gtk.MessageDialog): """ HIGfied Alert Dialog. - Implements the sugestions documented on: + Implements the suggestions documented in: http://developer.gnome.org/projects/gup/hig/2.0/windows-alert.html """ diff --git a/zenmap/zenmapGUI/higwidgets/hignotebooks.py b/zenmap/zenmapGUI/higwidgets/hignotebooks.py index 5e756ef6d..0713cb7ef 100644 --- a/zenmap/zenmapGUI/higwidgets/hignotebooks.py +++ b/zenmap/zenmapGUI/higwidgets/hignotebooks.py @@ -146,7 +146,7 @@ class HIGClosableTabLabel(HIGHBox): self.label_text = label_text self.__create_widgets() - #self.propery_map = {"label_text" : self.label.get_label} + #self.property_map = {"label_text" : self.label.get_label} def __create_widgets(self): self.label = gtk.Label(self.label_text) diff --git a/zenmap/zenmapGUI/higwidgets/higspinner.py b/zenmap/zenmapGUI/higwidgets/higspinner.py index 48d358189..538f8d033 100644 --- a/zenmap/zenmapGUI/higwidgets/higspinner.py +++ b/zenmap/zenmapGUI/higwidgets/higspinner.py @@ -191,7 +191,7 @@ class HIGSpinnerImages: self.rest_pixbuf = self.static_pixbufs[name] def set_size(self, width, height): - """Sets the size of eache pixbuf (static and animated)""" + """Sets the size of each pixbuf (static and animated)""" new_animated = [] for p in self.animated_pixbufs: new_animated.append(p.scale_simple(width, height, @@ -349,11 +349,11 @@ class HIGSpinner(gtk.EventBox): self.images_width = 32 self.images_height = 32 - # Timeout set to 100 miliseconds per frame, just as the + # Timeout set to 100 milliseconds per frame, just as the # Nautilus/Epiphany implementation self.timeout = 120 - # Initialize a cache for ouselves + # Initialize a cache for ourselves self.cache = HIGSpinnerCache() self.cache.load_static_from_lookup() self.cache.load_animated_from_lookup() diff --git a/zenmap/zenmapGUI/higwidgets/higtables.py b/zenmap/zenmapGUI/higwidgets/higtables.py index 6ddb107f1..5952fdc42 100644 --- a/zenmap/zenmapGUI/higwidgets/higtables.py +++ b/zenmap/zenmapGUI/higwidgets/higtables.py @@ -141,7 +141,7 @@ class HIGTable(gtk.Table): # TODO: # - Automatic position packing, - # - Gereric attach function that detects the widget type + # - Generic attach function that detects the widget type def __init__(self, rows=1, columns=1, homogeneous=False): gtk.Table.__init__(self, rows, columns, homogeneous)