Changeset 1431 for branch/ggpolo/umitDB/Store.py
- Timestamp:
- 08/19/07 04:05:09 (6 years ago)
- Files:
-
- 1 modified
-
branch/ggpolo/umitDB/Store.py (modified) (33 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branch/ggpolo/umitDB/Store.py
r1400 r1431 55 55 scan_d["hosts_down"], scan_d["scanner"])) 56 56 57 self.conn.commit()58 59 57 60 58 def insert_scaninfo_db(self, scaninfo): … … 69 67 scaninfo["services"], scaninfo["fk_scan"], 70 68 scaninfo["type"], scaninfo["protocol"])) 71 self.conn.commit()72 69 73 70 … … 80 77 self.cursor.execute("INSERT INTO scan_type (name) VALUES \ 81 78 (?)", (scan_name, )) 82 self.conn.commit()83 79 84 80 … … 91 87 self.cursor.execute("INSERT INTO scanner (name, version) VALUES \ 92 88 (?, ?)", (scanner_name, scanner_version)) 93 self.conn.commit()94 89 95 90 … … 105 100 (portid, service_info_id, protocol_id, 106 101 port_state_id)) 107 self.conn.commit()108 102 109 103 … … 116 110 self.cursor.execute("INSERT INTO port_state (state) VALUES \ 117 111 (?)", (port_state, )) 118 self.conn.commit()119 112 120 113 … … 127 120 self.cursor.execute("INSERT INTO protocol (name) VALUES \ 128 121 (?)", (protocol, )) 129 self.conn.commit()130 122 131 123 … … 138 130 self.cursor.execute("INSERT INTO _host_port (fk_host, fk_port) \ 139 131 VALUES (?, ?)", (fk_host, fk_port)) 140 self.conn.commit()141 132 142 133 … … 150 141 fk_port_state) VALUES (?, ?, ?)", 151 142 (count, fk_host, fk_port_state)) 152 self.conn.commit()153 143 154 144 … … 163 153 fk_protocol, fk_host) VALUES (?, ?, ?, ?)", 164 154 (portid, fk_port_state, fk_protocol, fk_host)) 165 self.conn.commit()166 155 167 156 … … 177 166 (?, ?, ?, ?, ?, ?)", (osclass_accuracy, fk_osgen, 178 167 fk_osfamily, fk_osvendor, fk_ostype, fk_host)) 179 self.conn.commit()180 168 181 169 … … 190 178 fk_host) VALUES (?, ?, ?, ?)", (osmatch["name"], 191 179 osmatch["accuracy"], osmatch["line"], host)) 192 self.conn.commit()193 180 194 181 … … 200 187 201 188 self.cursor.execute("INSERT INTO osgen (gen) VALUES (?)", (osgen, )) 202 self.conn.commit() 189 203 190 204 191 def insert_osfamily_db(self, osfamily): … … 210 197 self.cursor.execute("INSERT INTO osfamily (family) VALUES (?)", 211 198 (osfamily, )) 212 self.conn.commit()213 199 214 200 … … 221 207 self.cursor.execute("INSERT INTO osvendor (vendor) VALUES (?)", 222 208 (osvendor, )) 223 self.conn.commit()224 209 225 210 … … 232 217 self.cursor.execute("INSERT INTO ostype (type) VALUES (?)", 233 218 (ostype, )) 234 self.conn.commit()235 219 236 220 … … 244 228 fk_host_state) VALUES (?, ?, ?)", (host_d["distance"], 245 229 host_d["fk_scan"], host_d["fk_host_state"])) 246 self.conn.commit()247 230 248 231 … … 255 238 self.cursor.execute("INSERT INTO _host_address (fk_host, fk_address) \ 256 239 VALUES (?, ?)", (fk_host, fk_address)) 257 self.conn.commit()258 240 259 241 … … 267 249 fk_hostname) VALUES (?, ?)", (fk_host, 268 250 fk_hostname)) 269 self.conn.commit()270 251 271 252 … … 279 260 (?, ?)", (hostname["hostname_type"], 280 261 hostname["hostname"])) 281 self.conn.commit()282 262 283 263 … … 302 282 ip_id_sequence_value, fk_host) VALUES (?, ?, ?, ?, ?, ?, ?, \ 303 283 ?, ?, ?, ?)", (data)) 304 self.conn.commit()305 284 306 285 … … 313 292 self.cursor.execute("INSERT INTO service_name (name) VALUES \ 314 293 (?)", (service_name, )) 315 self.conn.commit()316 294 317 295 … … 325 303 extrainfo, method, conf, fk_service_name) VALUES (?, ?, ?,\ 326 304 ?, ?, ?)", service_data) 327 self.conn.commit()328 305 329 306 … … 337 314 fk_vendor) VALUES (?, ?, ?)", (address_addr, 338 315 address_type, vendor)) 339 self.conn.commit()340 316 341 317 … … 348 324 self.cursor.execute("INSERT INTO vendor (name) \ 349 325 VALUES (?)", (vendor_name, )) 350 self.conn.commit()351 326 352 327 … … 359 334 self.cursor.execute("INSERT INTO host_state (state) \ 360 335 VALUES (?)", (host_state, )) 361 self.conn.commit()362 336 363 337 … … 372 346 tcpseq_dict["index"], tcpseq_dict["class"], 373 347 tcpseq_dict["difficulty"], tcpseq_dict["values"])) 374 self.conn.commit()375 348 376 349 … … 385 358 tcp_ts_values) VALUES (?, ?)", (tcptsseq_dict["class"], 386 359 tcptsseq_dict["values"])) 387 self.conn.commit()388 360 389 361 … … 397 369 ip_id_values) VALUES (?, ?)", (ipidseq_dict["class"], 398 370 ipidseq_dict["values"])) 399 self.conn.commit()400 371 401 372 … … 408 379 self.cursor.execute("INSERT INTO inventory (name) VALUES (?)", 409 380 (inventory, )) 410 self.conn.commit()411 381 412 382 … … 419 389 self.cursor.execute("INSERT INTO _inventory_scan (fk_scan, \ 420 390 fk_inventory) VALUES (?, ?)", (scan, inventory)) 421 self.conn.commit()422 391 423 392 … … 431 400 self.cursor.execute("INSERT INTO inventory_change_category (name) \ 432 401 VALUES (?)", (category, )) 433 self.conn.commit()434 402 435 403 … … 448 416 short_descr, fk_inventory, 449 417 fk_category, fk_address)) 450 self.conn.commit() 451 418
