| 1 | |
|---|
| 2 | |
|---|
| 3 | from umitCore.NmapParser import NmapParser |
|---|
| 4 | #file_to_parse = open("/home/bastiao/Desktop/export.usr") |
|---|
| 5 | file_to_parse = open("quick.usr") |
|---|
| 6 | np = NmapParser(file_to_parse) |
|---|
| 7 | np.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 | |
|---|
| 17 | import umitExport.HTML.Parse |
|---|
| 18 | a = umitExport.HTML.Parse.ExportHTML(np, \ |
|---|
| 19 | "file.html") |
|---|
| 20 | a.add_style(""" |
|---|
| 21 | body { |
|---|
| 22 | margin-left:auto; margin-right:auto; |
|---|
| 23 | text-align:center; |
|---|
| 24 | font:12px Arial, Helvetica, sans-serif; |
|---|
| 25 | background-color:#FFCC66; |
|---|
| 26 | color: #000000; |
|---|
| 27 | } |
|---|
| 28 | |
|---|
| 29 | h1 |
|---|
| 30 | { |
|---|
| 31 | font:14px Arial, Helvetica, sans-serif; |
|---|
| 32 | } |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | h2 |
|---|
| 36 | { |
|---|
| 37 | font-style:oblique; |
|---|
| 38 | font-weight:bold; |
|---|
| 39 | font:13px Arial, Helvetica, sans-serif; |
|---|
| 40 | } |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | tr |
|---|
| 44 | { |
|---|
| 45 | |
|---|
| 46 | border-style: hidden; |
|---|
| 47 | font:11px Arial, Helvetica, sans-serif; |
|---|
| 48 | } |
|---|
| 49 | td |
|---|
| 50 | { |
|---|
| 51 | border-color: black; |
|---|
| 52 | border-style: solid; |
|---|
| 53 | font:11px Arial, Helvetica, sans-serif; |
|---|
| 54 | } |
|---|
| 55 | |
|---|
| 56 | |
|---|
| 57 | |
|---|
| 58 | |
|---|
| 59 | table |
|---|
| 60 | { |
|---|
| 61 | background-color: #FFFFCC; |
|---|
| 62 | border-style: hidden; |
|---|
| 63 | margin-left: auto; |
|---|
| 64 | margin-right: auto; |
|---|
| 65 | border-color: green; |
|---|
| 66 | } |
|---|
| 67 | |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | |
|---|
| 71 | """) |
|---|
| 72 | a.save() |
|---|