Changeset 179
- Timestamp:
- 09/29/09 05:08:16 (4 years ago)
- File:
-
- 1 edited
-
FierceParser/trunk/lib/Fierce/Parser.pod (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
FierceParser/trunk/lib/Fierce/Parser.pod
r16 r179 49 49 | | 50 50 | |--Fierce::Parser::Domain::FindMX -- Information about MX records found 51 | | 52 | |--Fierce::Parser::Domain::Vhost -- Information about Virtual Hosts found 51 53 52 54 … … 124 126 =item B<domain()> 125 127 126 Returns the domain name. 127 128 =back 128 returns the domain name. 129 130 =back 131 132 =head2 Fierce::Parser::Node 133 134 This object contains the information for a node. A Node is a simplistic object 135 containing information about a device found during a Fierce scan. Many of the 136 Fierce modules use a Node to represent the a device. 137 138 =over 4 139 140 =item B<ip()> 141 142 returns the ip address of the node. 143 144 =item B<hostname()> 145 146 returns the hostname of the node. 147 148 =back 129 149 130 150 =head2 Fierce::Parser::Domain::NameServers … … 136 156 =item B<startscan()> 137 157 138 Returns the start time of the scan in unixtime format. 139 140 =item B<startscanstr()> 141 142 Returns the start time of the scan in a readable string. 143 144 =item B<endscan()> 145 146 Returns the end time of the scan in unixtime format. 147 148 =item B<endscanstr()> 149 150 Returns the end time of the scan in a readable string. 151 152 =item B<elasptime()> 153 154 Returns the elasptime of the scan. 155 156 =back 158 returns the start time of the scan in unixtime format. 159 160 =item B<startscanstr()> 161 162 Returns the start time of the scan in a readable string. 163 164 =item B<endscan()> 165 166 Returns the end time of the scan in unixtime format. 167 168 =item B<endscanstr()> 169 170 Returns the end time of the scan in a readable string. 171 172 =item B<elasptime()> 173 174 returns the elasptime of the scan. 175 176 =item B<nodes()> 177 178 returns an Arrayref to a list of Node Objects. 179 180 =back 181 182 =head2 EXAMPLE 183 184 my $name_servers = $domain->name_servers; 185 186 foreach my $i ( @{ $name_servers->nodes } ) { 187 print "\thostname:" . "\t" . $i->hostname . "\n"; 188 print "\tip:" . "\t\t" . $i->ip . "\n"; 189 } 157 190 158 191 =head2 Fierce::Parser::Domain::ZoneTransfer … … 184 217 =back 185 218 219 =head2 EXAMPLE 220 221 my $name_servers = $domain->name_servers; 222 my $zone_transfers = $domain->zone_transfers; 223 224 foreach my $i ( @{ $name_servers->nodes } ) { 225 print "\tIP:" . "\t\t" . $i->ip . "\n"; 226 print "\tZone Transfer:" . "\t"; 227 ( scalar(grep($i->hostname eq $_->name_server, @{ $zone_transfers->result } )) == 1 ) ? print "Enabled\n" : print "Disabled\n"; 228 229 if ( scalar(grep($i->hostname eq $_->name_server, @{ $zone_transfers->result } )) == 1 ) { 230 print "\tZone Trasfer Result:" . "\t"; 231 foreach(@{ $zone_transfers->result} ) { print "\t\t" . $_->output . "\n"; } 232 } 233 234 } 235 186 236 =head2 Fierce::Parser::Domain::Bruteforce 187 237 238 This object contains the Nodes found using Prefix Bruteforce. 239 240 =over 4 241 242 =item B<startscan()> 243 244 Returns the start time of the scan in unixtime format. 245 246 =item B<startscanstr()> 247 248 Returns the start time of the scan in a readable string. 249 250 =item B<endscan()> 251 252 Returns the end time of the scan in unixtime format. 253 254 =item B<endscanstr()> 255 256 Returns the end time of the scan in a readable string. 257 258 =item B<elasptime()> 259 260 Returns the elasptime of the scan. 261 262 =item B<nodes()> 263 264 returns an arrayref to a list of node objects. 265 266 =back 267 268 =head2 EXAMPLE 269 270 my $bruteforce = $domain->bruteforce; 271 272 foreach ( @{ $bruteforce->nodes } ) { 273 print "\tHostname:" . "\t" . $_->hostname . "\n"; 274 print "\tIP: " . "\t\t" . $_->ip . "\n"; 275 } 276 277 =head2 Fierce::Parser::Domain::ExtBruteForce 278 188 279 This object contains the Nodes found using Extension Bruteforce. 189 280 … … 192 283 =item B<startscan()> 193 284 194 Returns the start time of the scan in unixtime format. 195 196 =item B<startscanstr()> 197 198 Returns the start time of the scan in a readable string. 199 200 =item B<endscan()> 201 202 Returns the end time of the scan in unixtime format. 203 204 =item B<endscanstr()> 205 206 Returns the end time of the scan in a readable string. 207 208 =item B<elasptime()> 209 210 Returns the elasptime of the scan. 211 212 =back 213 214 =head2 Fierce::Parser::Domain::ExtBruteforce 285 returns the start time of the scan in unixtime format. 286 287 =item B<startscanstr()> 288 289 returns the start time of the scan in a readable string. 290 291 =item B<endscan()> 292 293 returns the end time of the scan in unixtime format. 294 295 =item B<endscanstr()> 296 297 returns the end time of the scan in a readable string. 298 299 =item B<elasptime()> 300 301 returns the elasptime of the scan. 302 303 =item B<nodes()> 304 305 returns an arrayref to a list of node objects. 306 307 =back 308 309 =head2 EXAMPLE 310 311 my $ext_bruteforce = $domain->ext_bruteforce; 312 313 foreach ( @{ $ext_bruteforce->nodes } ) { 314 print "\thostname:" . "\t" . $_->hostname . "\n"; 315 print "\tip: " . "\t\t" . $_->ip . "\n"; 316 } 317 318 =head2 Fierce::Parser::Domain::ReverseLookups 215 319 216 320 This object contains the Nodes found using Reverse Lookups. … … 238 342 Returns the elasptime of the scan. 239 343 240 =back 241 242 243 =head2 Fierce::Parser::Domain::ReverseLookups 244 245 This object contains the Nodes found using Reverse Lookups. 246 247 =over 4 248 249 =item B<startscan()> 250 251 Returns the start time of the scan in unixtime format. 252 253 =item B<startscanstr()> 254 255 Returns the start time of the scan in a readable string. 256 257 =item B<endscan()> 258 259 Returns the end time of the scan in unixtime format. 260 261 =item B<endscanstr()> 262 263 Returns the end time of the scan in a readable string. 264 265 =item B<elasptime()> 266 267 Returns the elasptime of the scan. 268 269 =back 344 =item B<nodes()> 345 346 returns an ArrayRef to a list of Node Objects. 347 348 =back 349 350 =head2 EXAMPLE 351 352 my $reverse_lookups = $domain->reverse_lookups; 353 354 foreach ( @{ $reverse_lookups->nodes } ) { 355 print "\thostname:" . "\t" . $_->hostname . "\n"; 356 print "\tip: " . "\t\t" . $_->ip . "\n"; 357 } 358 270 359 271 360 =head2 Fierce::Parser::Domain::WildCard … … 295 384 Returns the elasptime of the scan. 296 385 297 =back 386 =back 298 387 299 388 =head2 Fierce::Parser::Domain::WhoisLookup … … 325 414 =back 326 415 416 =head2 EXAMPLE 417 327 418 =head2 Fierce::Parser::Domain::FindMX 328 419 … … 352 443 353 444 =back 445 446 =head2 EXAMPLE 447 448 my $reverse_lookups = $domain->reverse_lookups; 449 450 foreach ( @{ $findmx->result } ) { 451 print "\tpreference:" . "\t" . $_->preference . "\n"; 452 print "\texchange: " . "\t" . $_->exchange . "\n"; 453 } 454 455 456 =head2 Fierce::Parser::Domain::Vhost 457 458 This object contains Information about Virtual Hosts found. 459 460 =over 4 461 462 =item B<startscan()> 463 464 Returns the start time of the scan in unixtime format. 465 466 =item B<startscanstr()> 467 468 Returns the start time of the scan in a readable string. 469 470 =item B<endscan()> 471 472 Returns the end time of the scan in unixtime format. 473 474 =item B<endscanstr()> 475 476 Returns the end time of the scan in a readable string. 477 478 =item B<elasptime()> 479 480 Returns the elasptime of the scan. 481 482 =item B<nodes()> 483 484 returns an ArrayRef to a list of Node Objects. 485 486 =back 487 488 =head2 EXAMPLE 489 490 my $reverse_lookups = $domain->reverse_lookups; 491 492 foreach ( @{ $vhost->nodes } ) { 493 print "\thostname:" . "\t" . $_->hostname . "\n"; 494 print "\tip: " . "\t\t" . $_->ip . "\n"; 495 } 496 497 =head1 EXAMPLES 498 499 500 Here is an example of parsing an XML file using Fierce::Parser: 501 502 use Fierce::Parser; 503 my $fp = new Fierce::Parser; 504 505 if (defined($ARGV[0])){ 506 my $file = $ARGV[0]; 507 my $parser = $fp->parse_file($file); 508 my @nodes = $parser->get_all_nodes(); 509 510 foreach my $n (@nodes){ 511 my $domain = $n; 512 my $name_servers = $domain->name_servers; 513 my $zone_transfers = $domain->zone_transfers; 514 my $bruteforce = $domain->bruteforce; 515 my $vhost = $domain->vhost; 516 my $subdomain_bruteforce = $domain->subdomain_bruteforce; 517 my $ext_bruteforce = $domain->ext_bruteforce; 518 my $reverse_lookups = $domain->reverse_lookups; 519 my $wildcard = $domain->wildcard; 520 my $findmx = $domain->findmx; 521 my $find_nearby = $domain->find_nearby; 522 523 print "==== " . $n->domain . " ====\n"; 524 if ( $name_servers ) { 525 print "Nameservers:\n"; 526 foreach my $i ( @{ $name_servers->nodes } ) { 527 print "\tHostname:" . "\t" . $i->hostname . "\n"; 528 print "\tIP:" . "\t\t" . $i->ip . "\n"; 529 print "\tZone Transfer:" . "\t"; 530 ( scalar(grep($i->hostname eq $_->name_server, @{ $zone_transfers->result } )) == 1 ) ? print "Enabled\n" : print "Disabled\n"; 531 532 if ( scalar(grep($i->hostname eq $_->name_server, @{ $zone_transfers->result } )) == 1 ) { 533 print "\tZone Trasfer Result:" . "\t"; 534 foreach(@{ $zone_transfers->result} ) { print "\t\t" . $_->output . "\n"; } 535 } 536 537 } 538 print "\n"; 539 } 540 if ( $findmx ) { 541 print "MX:\n"; 542 foreach ( @{ $findmx->result } ) { 543 print "\tpreference:" . "\t" . $_->preference . "\n"; 544 print "\texchange: " . "\t" . $_->exchange . "\n"; 545 } 546 print "\n"; 547 } 548 549 if ($bruteforce) { 550 print "Prefix Bruteforce:\n"; 551 foreach ( @{ $bruteforce->nodes } ) { 552 print "\tHostname:" . "\t" . $_->hostname . "\n"; 553 print "\tIP: " . "\t\t" . $_->ip . "\n"; 554 } 555 print "\n"; 556 } 557 if ($vhost) { 558 print "Virtual Hosts:\n"; 559 foreach ( @{ $vhost->nodes } ) { 560 print "\thostname:" . "\t" . $_->hostname . "\n"; 561 print "\tip: " . "\t\t" . $_->ip . "\n"; 562 } 563 print "\n"; 564 } 565 if ($ext_bruteforce){ 566 print "Extension Bruteforce:\n"; 567 foreach ( @{ $ext_bruteforce->nodes } ) { 568 print "\thostname:" . "\t" . $_->hostname . "\n"; 569 print "\tip: " . "\t\t" . $_->ip . "\n"; 570 } 571 print "\n"; 572 } 573 if ($reverse_lookups){ 574 print "reverse lookup:\n"; 575 foreach ( @{ $reverse_lookups->nodes } ) { 576 print "\thostname:" . "\t" . $_->hostname . "\n"; 577 print "\tip: " . "\t\t" . $_->ip . "\n"; 578 } 579 print "\n"; 580 } 581 582 if ($find_nearby){ 583 print "Find Nearby:\n"; 584 foreach ( @{ $find_nearby->ptrs } ) { 585 print "\tPtrdname:" . "\t" . $_->ptrdname . "\n"; 586 print "\tIP: " . "\t\t" . $_->ip . "\n"; 587 } 588 } 589 } 590 591 } 592 else { 593 print "Usage: $0 [fierce-xml]\n"; 594 } 354 595 355 596 =head1 SEE ALSO … … 369 610 370 611 =cut 371 372
Note: See TracChangeset
for help on using the changeset viewer.