root/branch/NetworkInventory/umitCore/BasePaths.py @ 3827

Revision 3827, 5.7 kB (checked in by gpolo, 4 years ago)

Merged revisions 3010-3011,3104,3121,3149-3150,3174-3178,3263-3267,3269,3271-3278,3285 via svnmerge from
http://svn.umitproject.org/svnroot/umit/trunk

........

r3010 | getxsick | 2008-06-16 14:12:59 -0300 (Mon, 16 Jun 2008) | 1 line


Changed my email address at About.py

........

r3011 | luis | 2008-06-17 05:04:07 -0300 (Tue, 17 Jun 2008) | 1 line


Added new WinPcap? - now works in Windows Vista

........

r3104 | boltrix | 2008-07-08 21:26:08 -0300 (Tue, 08 Jul 2008) | 1 line


Added the slides directory to hold umit slides

........

r3121 | boltrix | 2008-07-10 09:40:59 -0300 (Thu, 10 Jul 2008) | 1 line


Discussing with Bartosz, we have detected that the header of higwidgets files containing the license claim are worng. The headers were copied from other Umit files which are GPL, and in reallity, higwidgets is LGPL as has always being described by the COPYING_HIGWIDGETS file inside the trunk. This is not a change of license, but a fix on the headers claimings.

........

r3149 | luis | 2008-07-15 12:17:09 -0300 (Tue, 15 Jul 2008) | 1 line


Remove pdb (debugger) - it was freezing searchs.

........

r3150 | luis | 2008-07-15 14:46:18 -0300 (Tue, 15 Jul 2008) | 1 line


Fixed BugReport? and CrashReport? format in the trac (break lines and code blocks)

........

r3174 | luis | 2008-07-19 17:59:17 -0300 (Sat, 19 Jul 2008) | 5 lines


  • Fixed icons install (and in uninstall_umit)
  • Added functions to build mo files 'on the fly'
  • Remove mo files from sdist


(this changes it's necessary to debian package)

........

r3175 | luis | 2008-07-20 14:35:32 -0300 (Sun, 20 Jul 2008) | 5 lines


  • Moved msgfmt.py from umitCore to utils/msgfmt.py (External libs now lives on utils/ )
  • Added header in Email (all files have enviroment path )
  • Added umit menu (xpm format) - necessary for alternatives window managers, like fluxbox, etc
  • Added new files to manifest file
  • Fixed deletion *.mo files in sdist (overwrite sdist.run ) and add xpm file to data_files - setup.py

........

r3176 | luis | 2008-07-20 14:37:28 -0300 (Sun, 20 Jul 2008) | 7 lines


  • Moved msgfmt.py from umitCore to utils/msgfmt.py (External libs now lives on utils/ )
  • Added header in Email (all files have enviroment path )
  • Added umit menu (xpm format) - necessary for alternatives window managers, like fluxbox, etc
  • Added new files to manifest file
  • Fixed deletion *.mo files in sdist (overwrite sdist.run ) and add xpm file to data_files - setup.py trunk/install_scripts/unix/setup.py


(Includes commit r3175)

........

r3177 | luis | 2008-07-20 16:12:29 -0300 (Sun, 20 Jul 2008) | 6 lines


Update licence - FSF address


Command used:
find . -path '*/.svn' -prune -o -type f -print0 | xargs -0 sed -i -e 's/59 Temple Place, Suite 330/51 Franklin Street, Fifth Floor/;s/02111-1307/02110-1301/;'


Check licences: licensecheck -c -r trunk_directory/

........

r3178 | luis | 2008-07-20 20:44:10 -0300 (Sun, 20 Jul 2008) | 1 line


A little fix on licence FSF address

........

r3263 | getxsick | 2008-07-30 16:49:28 -0300 (Wed, 30 Jul 2008) | 1 line


removed unnecessary comment in the polish po file.

........

r3264 | luis | 2008-07-31 09:44:01 -0300 (Thu, 31 Jul 2008) | 4 lines


  • Generate new language file
  • Merge new language file to pt_PT.po
  • Complete translation
  • Add licence to msgfmt.py

........

r3265 | luis | 2008-07-31 11:46:01 -0300 (Thu, 31 Jul 2008) | 1 line


  • Complete Portuguese translation

........

r3266 | boltrix | 2008-07-31 11:48:01 -0300 (Thu, 31 Jul 2008) | 1 line


Made some fixes to release stable version 0.9.5. Added version number to crash report in order to get more details of the crash and discover if user got the error because he is running umit over old versions of umitCore, umitGUI or higwidgets.

........

r3267 | boltrix | 2008-07-31 12:27:52 -0300 (Thu, 31 Jul 2008) | 1 line


I left a raise behind, that was not supposed to be there. That raise was used for crash report testing purposes only.

........

r3269 | boltrix | 2008-07-31 13:27:23 -0300 (Thu, 31 Jul 2008) | 1 line


Fixed a bug that was re-loading target and profile before scanning, overriding any manual changes made to the command. Working on scanning documentation also.

........

r3271 | boltrix | 2008-07-31 17:10:18 -0300 (Thu, 31 Jul 2008) | 1 line


Done with the scanning documentation improvement. Need to add some screenshots in the future.

........

r3272 | getxsick | 2008-07-31 18:33:49 -0300 (Thu, 31 Jul 2008) | 1 line


Typo fixing in string.

........

r3273 | getxsick | 2008-07-31 18:34:33 -0300 (Thu, 31 Jul 2008) | 1 line


updated polish translation

........

r3274 | rcarvalho | 2008-07-31 18:47:43 -0300 (Thu, 31 Jul 2008) | 2 lines


Updated locale translation file for Brazilian Portuguese.

........

r3275 | devtar | 2008-08-01 03:25:58 -0300 (Fri, 01 Aug 2008) | 1 line

........

r3276 | devtar | 2008-08-01 03:35:14 -0300 (Fri, 01 Aug 2008) | 1 line


Update on ms_MY and id_ID locales.

........

r3277 | luis | 2008-08-01 08:04:56 -0300 (Fri, 01 Aug 2008) | 1 line


Changed Delete Profile key strobe (confliting with Compara Results)

........

r3278 | luis | 2008-08-01 09:39:47 -0300 (Fri, 01 Aug 2008) | 3 lines


  • Fix little issue in the scanning (now compile)
  • Added Profile Editor documentation
  • Recompile all documentation

........

r3285 | rcarvalho | 2008-08-01 20:36:16 -0300 (Fri, 01 Aug 2008) | 2 lines


Updated .po and .mo files

........

Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3#
4# Copyright (C) 2005-2006 Insecure.Com LLC.
5# Copyright (C) 2007-2008 Adriano Monteiro Marques
6#
7# Author: Adriano Monteiro Marques <adriano@umitproject.org>
8#
9# This program is free software; you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 2 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program; if not, write to the Free Software
21# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
23import os
24import os.path
25import sys
26
27
28######################
29# Platform recognition
30PLATFORM = sys.platform
31HOME = os.path.expanduser("~")
32#HOME = os.environ.get('HOME', '')
33CURRENT_DIR = os.getcwd()
34
35# Look for files relative to the script path to allow running within the build
36# directory.
37main_dir = os.path.abspath(os.path.dirname(sys.argv[0]))
38if hasattr(sys, "frozen"):
39    main_dir = os.path.dirname(sys.executable)
40
41CONFIG_DIR = os.path.join(main_dir, "share", "umit", "config")
42LOCALE_DIR = os.path.join(main_dir, "share", "locale")
43MISC_DIR = os.path.join(main_dir, "share", "umit", "misc")
44ICONS_DIR = os.path.join(main_dir, "share", "icons", "umit")
45PIXMAPS_DIR = os.path.join(main_dir, "share", "pixmaps", "umit")
46DOCS_DIR = os.path.join(main_dir, "share", "doc", "umit")
47
48base_paths = dict(config_file = 'umit.conf',
49                  config_dir = '.umit',
50                  user_dir = os.path.join(HOME, '.umit'),
51                  scan_profile = 'scan_profile.usp',
52                  profile_editor = 'profile_editor.xml',
53                  recent_scans = 'recent_scans.txt',
54                  target_list = 'target_list.txt',
55                  wizard = 'wizard.xml',
56                  options = 'options.xml',
57                  umit_opf = 'umit.opf',
58                  umit_opt = 'umit.opt',
59                  scripts_dir = os.path.join('share', 'scripts'),
60                  pixmaps_dir = PIXMAPS_DIR,
61                  i18n_dir = LOCALE_DIR,
62                  i18n_message_file = 'umit.mo',
63                  scan_results_extension = 'usr',  # comes from umit scan result
64                  scan_profile_extension = 'usp',  # comes from umit scan profile
65                  user_home = HOME,
66                  basic_search_sequence = [HOME, CURRENT_DIR],
67                  config_search_sequence = [HOME, CURRENT_DIR],
68                  pixmaps_search_sequence = [os.path.join(CURRENT_DIR, PIXMAPS_DIR),
69                                             HOME],
70                  i18n_search_sequence = [os.path.join(CURRENT_DIR, LOCALE_DIR), HOME],
71                  umitdb = "umit.db",
72
73                  # new generation database
74                  umitdb_ng = "umitng.db",
75
76                  # timeline configuration
77                  tl_conf = "timeline-settings.conf",
78                  tl_colors_std = "tl_colors_evt_std.conf",
79                 
80                  # scheduler
81                  sched_schemas = "scheduler-schemas.conf",
82                  sched_profiles = "scheduler-profiles.conf",
83                  sched_log = "scheduler.log",
84
85                  # smtp
86                  smtp_schemas = "smtp-schemas.conf",
87
88                  services = "nmap-services",
89                  services_dump = "services.dmp",
90                  os_db = "nmap-os-db",
91                  os_dump = "os_db.dmp",
92                  os_fingerprints = "nmap-os-fingerprints",
93                  umit_version = "umit_version",
94                  os_classification = "os_classification.dmp")
95
96
97if PLATFORM == 'linux2' or PLATFORM == 'linux1':
98    base_paths.update(dict(user_home = HOME,
99                           basic_search_sequence = [os.path.join(HOME, base_paths['config_dir']),
100                                                    '/opt/umit', HOME, CURRENT_DIR],
101                           config_search_sequence = [os.path.join(HOME, base_paths['config_dir']),
102                                                     CURRENT_DIR, '/etc'],
103                           pixmaps_search_sequence = [os.path.join(CURRENT_DIR, PIXMAPS_DIR),
104                                                      '/usr/share/pixmaps/umit',
105                                                      '/opt/umit', HOME],
106                           i18n_search_sequence = [os.path.join(CURRENT_DIR, LOCALE_DIR),
107                                                   '/usr/share/locale',
108                                                   HOME, CURRENT_DIR]))
109elif PLATFORM == 'win32':
110    PROGRAM_FILES = os.environ.get("PROGRAMFILES", "\\")
111    UMIT_DIR = os.path.join(PROGRAM_FILES, "Umit")
112    PIXMAPS_DIR = os.path.join(UMIT_DIR, PIXMAPS_DIR)
113   
114    base_paths.update(dict(\
115        basic_search_sequence = [UMIT_DIR, PROGRAM_FILES, HOME, CURRENT_DIR],
116        config_search_sequence = [UMIT_DIR, PROGRAM_FILES, HOME, CURRENT_DIR],
117        pixmaps_search_sequence = [PIXMAPS_DIR, PROGRAM_FILES,
118                                   os.path.join(CURRENT_DIR, PIXMAPS_DIR),
119                                   HOME],
120        i18n_search_sequence = [UMIT_DIR, PROGRAM_FILES,
121                                os.path.join(CURRENT_DIR, LOCALE_DIR), HOME],))
122
123elif PLATFORM == 'darwin':
124    base_paths.update(dict(user_home = HOME,
125                           basic_search_sequence = [os.path.join(HOME, 'Applications'),
126                                                    '/Local', '/Network',
127                                                    '/System/Library', HOME]))
128
Note: See TracBrowser for help on using the browser.