MCPcopy
hub / github.com/nsonaniya2010/SubDomainizer / tldSorting

Function tldSorting

SubDomainizer.py:365–393  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

363
364
365def 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
396def PreCompiledRegexSecret():

Callers 2

savedataFunction · 0.85
SubDomainizer.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected