This function will sort all the items within the list in dictionary order. Parameters ------- subdomainList: list List of subdomains found from content. Returns -------- list a list of subdomains.
(subdomainList)
| 363 | |
| 364 | |
| 365 | def tldSorting(subdomainList): |
| 366 | """ |
| 367 | |
| 368 | This function will sort all the items within the list in dictionary order. |
| 369 | |
| 370 | Parameters |
| 371 | ------- |
| 372 | subdomainList: list |
| 373 | List of subdomains found from content. |
| 374 | |
| 375 | Returns |
| 376 | -------- |
| 377 | list |
| 378 | a list of subdomains. |
| 379 | """ |
| 380 | |
| 381 | localsortedlist = list() |
| 382 | finallist = list() |
| 383 | for item in subdomainList: |
| 384 | Reverseddomain = ".".join(str(item).split('.')[::-1]) |
| 385 | localsortedlist.append(Reverseddomain) |
| 386 | |
| 387 | sortedlist = sorted(localsortedlist) |
| 388 | |
| 389 | for item in sortedlist: |
| 390 | reReverseddomain = ".".join(str(item).split('.')[::-1]) |
| 391 | finallist.append(reReverseddomain) |
| 392 | |
| 393 | return finallist |
| 394 | |
| 395 | |
| 396 | def PreCompiledRegexSecret(): |
no outgoing calls
no test coverage detected