This function will put data in output file if given.
()
| 663 | |
| 664 | |
| 665 | def savedata(): |
| 666 | """ |
| 667 | |
| 668 | This function will put data in output file if given. |
| 669 | |
| 670 | """ |
| 671 | |
| 672 | # for item in tldSorting(finalset): |
| 673 | # print(termcolor.colored(item, color='green', attrs=['bold'])) |
| 674 | # if ipv4list: |
| 675 | # print(termcolor.colored("\nGot Some IPv4 addresses:\n", |
| 676 | # color='blue', attrs=['bold'])) |
| 677 | # for ip in ipv4list: |
| 678 | # if socket.getfqdn(ip) != ip: |
| 679 | # print(termcolor.colored(ip + ' - ' + socket.getfqdn(ip), |
| 680 | # color='green', attrs=['bold'])) |
| 681 | |
| 682 | print(termcolor.colored( |
| 683 | "\nWriting all the subdomains to given file...\n", color='yellow', attrs=['bold'])) |
| 684 | with open(args.output, 'w+') as f: |
| 685 | for item in tldSorting(finalset): |
| 686 | f.write(item + '\n') |
| 687 | print(termcolor.colored("\nWriting Done..\n", |
| 688 | color='yellow', attrs=['bold'])) |
| 689 | |
| 690 | |
| 691 | def savecloudresults(): |
no test coverage detected