def _create_target(self): """Create a target and update the list""" self.target_label = HIGEntryLabel(_("Target:")) self.target_entry = TargetCombo() self.update_target_list()
def __create_widgets(self): self.host_status_expander = gtk.Expander('<b>' + _('Host Status') + '</b>') self.address_expander = gtk.Expander('<b>' + _('Addresses') + '</b>') self.hostnames_expander = gtk.Expander('<b>' + _('Hostnames') + '</b>') self.os_expander = gtk.Expander('<b>' + _('Operating System') + '</b>') self.portsused_expander = gtk.Expander('<b>' + _('Ports used') + '</b>') self.osclass_expander = gtk.Expander('<b>' + _('OS Classes') + '</b>') self.tcp_expander = gtk.Expander('<b>' + _('TCP Sequence') + '</b>') self.ip_expander = gtk.Expander('<b>' + _('IP ID Sequence') + '</b>') self.tcpts_expander = gtk.Expander('<b>' + _('TCP TS Sequence') + '</b>') self.comment_expander = gtk.Expander('<b>' + _('Comments') + '</b>') self.os_image = gtk.Image() self.vulnerability_image = gtk.Image() # Host Status expander self.host_state_label = HIGEntryLabel(_('State:')) self.info_host_state_label = HIGEntryLabel(na) self.open_label = HIGEntryLabel(_('Open ports:')) self.info_open_ports = HIGEntryLabel(na) self.filtered_label = HIGEntryLabel(_('Filtered ports:')) self.info_filtered_label = HIGEntryLabel(na) self.closed_label = HIGEntryLabel(_('Closed ports:')) self.info_closed_ports = HIGEntryLabel(na) self.scanned_label = HIGEntryLabel(_('Scanned ports:')) self.info_scanned_label = HIGEntryLabel(na) self.uptime_label = HIGEntryLabel(_('Up time:')) self.info_uptime_label = HIGEntryLabel(na) self.lastboot_label = HIGEntryLabel(_('Last boot:')) self.info_lastboot_label = HIGEntryLabel(na) # Addresses expander self.ipv4_label = HIGEntryLabel(_('IPv4:')) self.info_ipv4_label = HIGEntryLabel(na) self.ipv6_label = HIGEntryLabel(_('IPv6:')) self.info_ipv6_label = HIGEntryLabel(na) self.mac_label = HIGEntryLabel(_('MAC:')) self.info_mac_label = HIGEntryLabel(na) self.vendor_label = HIGEntryLabel(_('Vendor:')) self.info_vendor_label = HIGEntryLabel(na)
def __parse_target(self, target_element): label = _(target_element.getAttribute(u'label')) label_widget = HIGEntryLabel(label) target_widget = TargetEntry(self.ops) target_widget.connect("changed", self.update_target) return label_widget, target_widget
def __init__(self, scan): HIGVBox.__init__(self) na = _('Not available') # Command info self.command_label = HIGEntryLabel(_('Command:')) self.info_command_label = HIGEntryLabel(na) self.nmap_version_label = HIGEntryLabel(_('Nmap Version:')) self.info_nmap_version_label = HIGEntryLabel(na) self.verbose_label = HIGEntryLabel(_('Verbosity level:')) self.info_verbose_label = HIGEntryLabel(na) self.debug_label = HIGEntryLabel(_('Debug level:')) self.info_debug_label = HIGEntryLabel(na) self.command_expander = gtk.Expander("<b>" + _("Command Info") + "</b>") self.command_expander.set_use_markup(True) self.command_table = HIGTable() self.command_table.set_border_width(5) self.command_table.set_row_spacings(6) self.command_table.set_col_spacings(6) self.command_hbox = HIGHBox() self.command_hbox._pack_noexpand_nofill(hig_box_space_holder()) self.command_hbox._pack_noexpand_nofill(self.command_table) self.command_table.attach(self.command_label, 0, 1, 0, 1) self.command_table.attach(self.info_command_label, 1, 2, 0, 1) self.command_table.attach(self.nmap_version_label, 0, 1, 1, 2) self.command_table.attach(self.info_nmap_version_label, 1, 2, 1, 2) self.command_table.attach(self.verbose_label, 0, 1, 2, 3) self.command_table.attach(self.info_verbose_label, 1, 2, 2, 3) self.command_table.attach(self.debug_label, 0, 1, 3, 4) self.command_table.attach(self.info_debug_label, 1, 2, 3, 4) self.command_expander.add(self.command_hbox) self._pack_noexpand_nofill(self.command_expander) self.command_expander.set_expanded(True) # General info: self.start_label = HIGEntryLabel(_('Started on:')) self.info_start_label = HIGEntryLabel(na) self.finished_label = HIGEntryLabel(_('Finished on:')) self.info_finished_label = HIGEntryLabel(na) self.host_up_label = HIGEntryLabel(_('Hosts up:')) self.info_hosts_up_label = HIGEntryLabel(na) self.host_down_label = HIGEntryLabel(_('Hosts down:')) self.info_hosts_down_label = HIGEntryLabel(na) self.host_scanned_label = HIGEntryLabel(_('Hosts scanned:')) self.info_hosts_scanned_label = HIGEntryLabel(na) self.open_label = HIGEntryLabel(_('Open ports:')) self.info_open_label = HIGEntryLabel(na) self.filtered_label = HIGEntryLabel(_('Filtered ports:')) self.info_filtered_label = HIGEntryLabel(na) self.closed_label = HIGEntryLabel(_('Closed ports:')) self.info_closed_label = HIGEntryLabel(na) self.general_expander = gtk.Expander("<b>" + _("General Info") + "</b>") self.general_expander.set_use_markup(True) self.general_table = HIGTable() self.general_table.set_border_width(5) self.general_table.set_row_spacings(6) self.general_table.set_col_spacings(6) self.general_hbox = HIGHBox() self.general_hbox._pack_noexpand_nofill(hig_box_space_holder()) self.general_hbox._pack_noexpand_nofill(self.general_table) self.general_table.attach(self.start_label, 0, 1, 0, 1) self.general_table.attach(self.info_start_label, 1, 2, 0, 1) self.general_table.attach(self.finished_label, 0, 1, 1, 2) self.general_table.attach(self.info_finished_label, 1, 2, 1, 2) self.general_table.attach(self.host_up_label, 0, 1, 2, 3) self.general_table.attach(self.info_hosts_up_label, 1, 2, 2, 3) self.general_table.attach(self.host_down_label, 0, 1, 3, 4) self.general_table.attach(self.info_hosts_down_label, 1, 2, 3, 4) self.general_table.attach(self.host_scanned_label, 0, 1, 4, 5) self.general_table.attach(self.info_hosts_scanned_label, 1, 2, 4, 5) self.general_table.attach(self.open_label, 0, 1, 5, 6) self.general_table.attach(self.info_open_label, 1, 2, 5, 6) self.general_table.attach(self.filtered_label, 0, 1, 6, 7) self.general_table.attach(self.info_filtered_label, 1, 2, 6, 7) self.general_table.attach(self.closed_label, 0, 1, 7, 8) self.general_table.attach(self.info_closed_label, 1, 2, 7, 8) self.general_expander.add(self.general_hbox) self._pack_noexpand_nofill(self.general_expander) self.general_expander.set_expanded(True) self._set_from_scan(scan)
def _create_profile(self): """Create new profile and update list""" self.profile_label = HIGEntryLabel(_('Profile:')) self.profile_entry = ProfileCombo() self.update()