root/branch/PreferencesWindow/parse.py @ 3645

Revision 3645, 1.2 kB (checked in by luis, 5 years ago)

Fixed exception issue on osclasses

Line 
1
2
3from umitCore.NmapParser import NmapParser
4#file_to_parse = open("/home/bastiao/Desktop/export.usr")
5file_to_parse = open("quick.usr")
6np = NmapParser(file_to_parse)
7np.parse()
8
9#from pprint import pprint
10#print "Profile:", np.profile
11#print "Profile name:", np.profile_name
12#print "Profile description:", np.profile_description
13#print "Profile hint:", np.profile_hint
14#print "Profile annotation:", np.profile_annotation
15#print "Profile options:", np.profile_options
16
17import umitExport.HTML.Parse
18a = umitExport.HTML.Parse.ExportHTML(np, \
19                                     "file.html")
20a.add_style("""
21body {
22margin-left:auto; margin-right:auto;
23text-align:center;
24font:12px Arial, Helvetica, sans-serif;
25background-color:#FFCC66;
26color: #000000;
27}
28
29h1
30{
31font:14px Arial, Helvetica, sans-serif;
32}
33
34
35h2
36{
37font-style:oblique;
38font-weight:bold;
39font:13px Arial, Helvetica, sans-serif;
40}
41
42
43tr
44{
45
46border-style: hidden;
47font:11px Arial, Helvetica, sans-serif;
48}
49td
50{
51border-color: black;
52border-style: solid;
53font:11px Arial, Helvetica, sans-serif;
54}
55
56
57
58
59table
60{
61background-color: #FFFFCC;
62border-style: hidden;
63margin-left: auto;
64margin-right: auto;
65border-color: green;
66}
67
68
69
70
71""")
72a.save()
Note: See TracBrowser for help on using the browser.