1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 21:21:31 +00:00

Remove unused imports

This commit is contained in:
dmiller
2019-12-28 02:42:14 +00:00
parent 6d624f9ed7
commit 92bf83aaba
38 changed files with 20 additions and 104 deletions

View File

@@ -125,8 +125,6 @@
# * *
# ***************************************************************************/
import os
INFO = {'name': 'RadialNet',
'version': '0.44',

View File

@@ -129,7 +129,6 @@ import gtk
import math
import gobject
import radialnet.util.drawing as drawing
import radialnet.util.geometry as geometry
from radialnet.bestwidgets.boxes import *

View File

@@ -126,7 +126,6 @@
# ***************************************************************************/
import gtk
import pango
from radialnet.core.Info import INFO
from radialnet.gui.Image import Pixmaps

View File

@@ -126,7 +126,6 @@
# ***************************************************************************/
import os
import sys
import gtk
import array

View File

@@ -131,13 +131,11 @@ import math
import cairo
import zenmapCore.I18N
import radialnet.util.drawing as drawing
from radialnet.bestwidgets.windows import *
from radialnet.bestwidgets.boxes import *
from radialnet.bestwidgets.labels import *
from radialnet.gui.Image import Pixmaps
from radialnet.gui.NodeNotebook import NodeNotebook
from radialnet.util.drawing import *
DIMENSION_NORMAL = (350, 450)

View File

@@ -127,18 +127,15 @@
import gtk
import math
import time
import copy
import cairo
import gobject
import radialnet.util.drawing as drawing
import radialnet.util.geometry as geometry
import radialnet.util.misc as misc
from radialnet.core.Coordinate import PolarCoordinate, CartesianCoordinate
from radialnet.core.Interpolation import Linear2DInterpolator
from radialnet.core.Graph import Graph, Node
from radialnet.core.Graph import Node
from radialnet.gui.NodeWindow import NodeWindow
from radialnet.gui.Image import Icons, get_pixels_for_cairo_image_surface

View File

@@ -125,9 +125,7 @@
# * *
# ***************************************************************************/
import os
import gtk
import gobject
from radialnet.bestwidgets.buttons import *
from radialnet.gui.SaveDialog import SaveDialog

View File

@@ -128,7 +128,6 @@
import os
import sys
import gtk
from core.ArgvHandle import *
from gui.Application import *

View File

@@ -125,8 +125,6 @@
# * *
# ***************************************************************************/
import math
def cairo_to_gdk_color(color):
"""

View File

@@ -127,7 +127,6 @@
from radialnet.core.Graph import *
from radialnet.gui.RadialNet import NetNode
import zenmapCore.NmapParser
import math

View File

@@ -126,7 +126,6 @@
# * *
# ***************************************************************************/
import datetime
import os
import subprocess
import sys

View File

@@ -128,7 +128,6 @@
import locale
import os
import sys
from zenmapCore.Name import APP_NAME

View File

@@ -139,14 +139,12 @@ import unittest
import zenmapCore.I18N
from types import StringTypes
try:
import subprocess
except ImportError, e:
raise ImportError(str(e) + ".\n" + _("Python 2.4 or later is required."))
import zenmapCore.Paths
from zenmapCore.Paths import Path
from zenmapCore.NmapOptions import NmapOptions
from zenmapCore.UmitLogging import log
from zenmapCore.UmitConf import PathsConfig

View File

@@ -127,8 +127,6 @@
# ***************************************************************************/
import locale
import os
import os.path
import time
import socket
import copy
@@ -143,7 +141,6 @@ except ImportError:
import xml
xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x]
from types import StringTypes
from xml.sax import make_parser
from xml.sax import SAXException
from xml.sax.handler import ContentHandler, EntityResolver
@@ -151,8 +148,7 @@ from xml.sax.saxutils import XMLGenerator
from xml.sax.xmlreader import AttributesImpl as Attributes
import zenmapCore.I18N
from zenmapCore.UmitLogging import log
from zenmapCore.NmapOptions import NmapOptions, split_quoted, join_quoted
from zenmapCore.NmapOptions import NmapOptions, join_quoted
from zenmapCore.StringPool import unique
# The version of the Nmap DTD this file understands and emits.

View File

@@ -135,7 +135,6 @@ import sys
import shutil
from zenmapCore.BasePaths import base_paths, fs_dec
from zenmapCore.Version import VERSION
from zenmapCore.Name import APP_NAME

View File

@@ -180,8 +180,6 @@ class RecentScans(object):
recent_scans = RecentScans()
if __name__ == "__main__":
import sys
from os.path import split
r = RecentScans()
print ">>> Getting empty list:", r.get_recent_scans_list()
print ">>> Adding recent scan bla:", r.add_recent_scan("bla")

View File

@@ -134,9 +134,6 @@ import re
import os
import sys
from zenmapCore.Paths import Path
from zenmapCore.UmitLogging import log
class ScriptDBSyntaxError(SyntaxError):
"""Exception raised when encountering a syntax error in the script.db"""

View File

@@ -181,8 +181,6 @@ class TargetList(object):
target_list = TargetList()
if __name__ == "__main__":
import sys
from os.path import split
t = TargetList()
print ">>> Getting empty list:", t.get_target_list()
print ">>> Adding target 127.0.0.1:", t.add_target("127.0.0.3")

View File

@@ -126,7 +126,6 @@
# * *
# ***************************************************************************/
from os.path import exists
from ConfigParser import ConfigParser, DEFAULTSECT, NoOptionError, \
NoSectionError
from zenmapCore.UmitLogging import log

View File

@@ -127,7 +127,7 @@
# ***************************************************************************/
from optparse import OptionParser
from zenmapCore.Name import APP_NAME, NMAP_DISPLAY_NAME
from zenmapCore.Name import NMAP_DISPLAY_NAME
from zenmapCore.Version import VERSION
import zenmapCore.I18N
from zenmapCore.BasePaths import base_paths

View File

@@ -127,7 +127,6 @@
# ***************************************************************************/
import gtk
import os.path
import webbrowser
from zenmapGUI.higwidgets.higdialogs import HIGDialog
@@ -142,7 +141,6 @@ from zenmapGUI.higwidgets.higtextviewers import HIGTextView
from zenmapCore.Name import APP_DISPLAY_NAME, APP_WEB_SITE, APP_COPYRIGHT, \
NMAP_DISPLAY_NAME, NMAP_WEB_SITE, UMIT_DISPLAY_NAME, UMIT_WEB_SITE
from zenmapCore.Version import VERSION
from zenmapCore.Paths import Path
import zenmapCore.I18N

View File

@@ -159,15 +159,12 @@ warnings.resetwarnings()
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog
import zenmapCore.UmitConf
import zenmapCore.Paths
from zenmapCore.UmitConf import is_maemo
from zenmapCore.UmitConf import is_maemo, config_parser, SearchConfig
from zenmapCore.UmitLogging import log
from zenmapCore.UmitOptionParser import option_parser
from zenmapCore.Name import APP_NAME, APP_DISPLAY_NAME, NMAP_DISPLAY_NAME
from zenmapCore.UmitConf import SearchConfig
import zenmapCore.I18N
from zenmapCore.Paths import Path
from zenmapCore.Paths import Path, create_user_config_dir
from zenmapCore.Name import APP_DISPLAY_NAME
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog
@@ -229,7 +226,6 @@ def install_excepthook():
# Cause an exception if PyGTK can't open a display. Normally this just
# produces a warning, but the lack of a display eventually causes a
# segmentation fault. See http://live.gnome.org/PyGTK/WhatsNew210.
import warnings
warnings.filterwarnings("error", module="gtk")
import gtk
warnings.resetwarnings()
@@ -284,7 +280,7 @@ def run():
try:
# Create the ~/.zenmap directory by copying from the system-wide
# template directory.
zenmapCore.Paths.create_user_config_dir(
create_user_config_dir(
Path.user_config_dir, Path.config_dir)
except (IOError, OSError), e:
error_dialog = HIGAlertDialog(
@@ -309,11 +305,11 @@ scan profiles. Check for access to the directory and try again.""") % (
try:
# Read the ~/.zenmap/zenmap.conf configuration file.
zenmapCore.UmitConf.config_parser.read(Path.user_config_file)
config_parser.read(Path.user_config_file)
except ConfigParser.ParsingError, e:
# ParsingError can leave some values as lists instead of strings. Just
# blow it all away if we have this problem.
zenmapCore.UmitConf.config_parser = zenmapCore.UmitConf.config_parser.__class__()
config_parser = config_parser.__class__()
error_dialog = HIGAlertDialog(
message_format=_("Error parsing the configuration file"),
secondary_text=_("""\

View File

@@ -128,7 +128,6 @@
import gobject
import gtk
import pango
import os
import os.path
import sys
@@ -139,7 +138,7 @@ xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x]
import xml.sax
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog, HIGDialog
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog
from zenmapGUI.higwidgets.higboxes import HIGVBox, HIGHBox, \
hig_box_space_holder
from zenmapGUI.higwidgets.higlabels import HIGSectionLabel

View File

@@ -129,11 +129,9 @@
import gtk
import gobject
import re
import sys
import os.path
from zenmapCore.Paths import Path
from zenmapCore.UmitConf import is_maemo
from zenmapCore.UmitLogging import log
icon_names = (

View File

@@ -130,8 +130,7 @@ import gtk
import sys
import os
from os.path import split, isfile, join, abspath, exists
import errno
from os.path import split, isfile, join, abspath
# Prevent loading PyXML
import xml
@@ -139,13 +138,10 @@ xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x]
import xml.sax.saxutils
from time import time
from zenmapGUI.higwidgets.higwindows import HIGMainWindow
from zenmapGUI.higwidgets.higdialogs import HIGDialog, HIGAlertDialog
from zenmapGUI.higwidgets.higlabels import HIGEntryLabel
from zenmapGUI.higwidgets.higboxes import HIGHBox, HIGVBox
from zenmapGUI.higwidgets.higlabels import HIGSectionLabel
import zenmapGUI.App
from zenmapGUI.FileChoosers import *
@@ -164,7 +160,6 @@ from zenmapCore.UmitLogging import log
import zenmapCore.I18N
import zenmapGUI.Print
from zenmapCore.UmitConf import SearchConfig, is_maemo, WindowConfig, config_parser
from zenmapCore.NetworkInventory import FilteredNetworkInventory
UmitScanWindow = None
hildon = None

View File

@@ -126,8 +126,6 @@
# * *
# ***************************************************************************/
import locale
import sys
import gobject
import gtk
import gtk.gdk

View File

@@ -136,17 +136,14 @@ xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x]
from xml.dom import minidom
from zenmapGUI.higwidgets.higboxes import HIGHBox
from zenmapGUI.higwidgets.higlabels import HIGEntryLabel
from zenmapGUI.higwidgets.higbuttons import HIGButton
from zenmapGUI.FileChoosers import AllFilesFileChooserDialog
from zenmapGUI.ProfileHelp import ProfileHelp
from zenmapCore.Paths import Path
from zenmapCore.NmapOptions import NmapOptions, split_quoted, join_quoted
import zenmapCore.I18N
from zenmapCore.UmitLogging import log
from zenmapGUI.ScriptInterface import *

View File

@@ -139,7 +139,7 @@ from zenmapGUI.higwidgets.higtables import HIGTable
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog, HIGDialog
from zenmapGUI.OptionBuilder import *
from zenmapCore.Paths import Path
from zenmapCore.UmitConf import Profile, CommandProfile
from zenmapCore.UmitConf import CommandProfile
from zenmapCore.UmitLogging import log
import zenmapCore.I18N
from zenmapCore.NmapOptions import NmapOptions

View File

@@ -128,7 +128,6 @@
import gtk
from types import StringTypes
from zenmapGUI.higwidgets.higboxes import HIGVBox
from zenmapGUI.Icons import get_os_icon
import zenmapCore.I18N

View File

@@ -139,18 +139,16 @@ xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x]
import xml.sax
from zenmapGUI.higwidgets.hignotebooks import HIGNotebook, HIGAnimatedTabLabel
from zenmapGUI.higwidgets.higboxes import HIGVBox, HIGHBox
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog, HIGDialog
from zenmapGUI.higwidgets.hignotebooks import HIGNotebook
from zenmapGUI.higwidgets.higboxes import HIGVBox
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog
from zenmapGUI.higwidgets.higscrollers import HIGScrolledWindow
from zenmapGUI.higwidgets.higlabels import HIGSectionLabel
from zenmapGUI.FilterBar import FilterBar
from zenmapGUI.ScanHostDetailsPage import ScanHostDetailsPage
from zenmapGUI.ScanToolbar import ScanCommandToolbar, ScanToolbar
from zenmapGUI.ScanHostsView import ScanHostsView
from zenmapGUI.ScanOpenPortsPage import ScanOpenPortsPage
from zenmapGUI.ScanRunDetailsPage import ScanRunDetailsPage
from zenmapGUI.ScanNmapOutputPage import ScanNmapOutputPage
from zenmapGUI.ScanScanListPage import ScanScanListPage
from zenmapGUI.ScansListStore import ScansListStore
@@ -159,7 +157,7 @@ from zenmapGUI.TopologyPage import TopologyPage
from zenmapCore.NetworkInventory import NetworkInventory,\
FilteredNetworkInventory
from zenmapCore.NmapCommand import NmapCommand
from zenmapCore.UmitConf import CommandProfile, ProfileNotFound, is_maemo
from zenmapCore.UmitConf import CommandProfile, is_maemo
from zenmapCore.NmapParser import NmapParser
from zenmapCore.Paths import Path, get_extra_executable_search_paths
from zenmapCore.UmitLogging import log

View File

@@ -135,7 +135,6 @@ from zenmapGUI.higwidgets.higboxes import HIGHBox, HIGVBox
from zenmapGUI.NmapOutputViewer import NmapOutputViewer
from zenmapGUI.ScanRunDetailsPage import ScanRunDetailsPage
from zenmapGUI.ScansListStore import ScansListStore
from zenmapCore.Paths import Path
from zenmapCore.UmitLogging import log
import zenmapCore.I18N

View File

@@ -128,8 +128,7 @@
import gtk
from zenmapGUI.higwidgets.higboxes import HIGVBox, HIGHBox
from zenmapGUI.higwidgets.higtables import HIGTable
from zenmapGUI.higwidgets.higboxes import HIGVBox
from zenmapCore.UmitLogging import log
import zenmapCore.I18N

View File

@@ -129,7 +129,6 @@
import gtk
from zenmapGUI.higwidgets.higboxes import HIGHBox
from zenmapGUI.higwidgets.higbuttons import HIGButton
from zenmapGUI.higwidgets.higlabels import HIGEntryLabel
import zenmapCore.I18N

View File

@@ -138,20 +138,13 @@ xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x]
import xml.sax
from zenmapGUI.higwidgets.higwindows import HIGWindow
from zenmapGUI.higwidgets.higboxes import HIGVBox, HIGHBox, HIGSpacer,\
hig_box_space_holder
from zenmapGUI.higwidgets.higlabels import HIGSectionLabel, HIGEntryLabel
from zenmapGUI.higwidgets.higboxes import HIGVBox, HIGHBox, hig_box_space_holder
from zenmapGUI.higwidgets.higscrollers import HIGScrolledWindow
from zenmapGUI.higwidgets.higtextviewers import HIGTextView
from zenmapGUI.higwidgets.higbuttons import HIGButton
from zenmapGUI.higwidgets.higtables import HIGTable
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog, HIGDialog
from zenmapCore.ScriptMetadata import *
from zenmapCore.ScriptArgsParser import parse_script_args_dict
from zenmapCore.NmapCommand import NmapCommand
from zenmapCore.NmapOptions import NmapOptions
from zenmapCore.Paths import Path
import zenmapCore.NSEDocParser
import zenmapGUI.FileChoosers
from zenmapCore.UmitConf import PathsConfig

View File

@@ -127,29 +127,20 @@
# ***************************************************************************/
import gtk
import os.path
import re
import copy
from zenmapGUI.higwidgets.higwindows import HIGWindow
from zenmapGUI.higwidgets.higboxes import HIGVBox
from zenmapGUI.higwidgets.higbuttons import HIGButton, HIGToggleButton
from zenmapGUI.higwidgets.higboxes import HIGVBox, HIGHBox, HIGSpacer,\
hig_box_space_holder
from zenmapGUI.higwidgets.higlabels import HIGSectionLabel, HIGEntryLabel,\
HintWindow
from zenmapGUI.higwidgets.higtables import HIGTable
from zenmapGUI.higwidgets.higboxes import HIGHBox
from zenmapGUI.higwidgets.higlabels import HIGSectionLabel, HintWindow
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog
from types import StringTypes
import datetime
from zenmapCore.Name import APP_DISPLAY_NAME
import zenmapCore.I18N
from zenmapCore.UmitLogging import log
from zenmapCore.NmapOptions import split_quoted
from zenmapCore.SearchResult import SearchDir, SearchDB, SearchDummy
from zenmapCore.UmitConf import is_maemo
from zenmapCore.UmitConf import SearchConfig
from zenmapGUI.FileChoosers import DirectoryChooserDialog

View File

@@ -129,17 +129,9 @@
import gtk
from zenmapGUI.ScanToolbar import *
from zenmapCore.NetworkInventory import NetworkInventory
from zenmapCore.UmitConf import CommandProfile, ProfileNotFound
from zenmapCore.NmapCommand import NmapCommand
from zenmapCore.NmapParser import NmapParser
from zenmapGUI.higwidgets.higboxes import HIGVBox, HIGHBox
from zenmapGUI.higwidgets.higdialogs import HIGAlertDialog
from zenmapGUI.higwidgets.higbuttons import HIGButton, HIGToggleButton
from zenmapGUI.higwidgets.higwindows import HIGWindow
from zenmapGUI.higwidgets.higboxes import HIGVBox
from radialnet.core.XMLHandler import XMLReader
from radialnet.gui.RadialNet import *
from radialnet.gui.ControlWidget import *
from radialnet.gui.Toolbar import Toolbar

View File

@@ -129,7 +129,6 @@
import gtk
import gobject
from higspinner import HIGSpinner
from higboxes import HIGHBox
from higbuttons import HIGButton

View File

@@ -134,7 +134,6 @@ higwidgets/higspinner.py
__all__ = ['HIGSpinner']
import os
import gtk
import gobject