Skip to content

Commit

Permalink
Switched to platform-specific line separators when writing out files
Browse files Browse the repository at this point in the history
  • Loading branch information
tjps committed Jul 13, 2017
1 parent 27cfe34 commit a24faca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sublist3r.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
except:
print("[!] Error: Coloring libraries not installed, no coloring will be used [Check the readme]")
G = Y = B = R = W = G = Y = B = R = W = ''


else:
G = '\033[92m' # green
Expand Down Expand Up @@ -106,7 +106,7 @@ def write_file(filename, subdomains):
print("%s[-] Saving results to file: %s%s%s%s" % (Y, W, R, filename, W))
with open(str(filename), 'wt') as f:
for subdomain in subdomains:
f.write(subdomain + "\r\n")
f.write(subdomain + os.linesep)


def subdomain_sorting_key(hostname):
Expand Down Expand Up @@ -151,7 +151,7 @@ def __init__(self, base_url, engine_name, domain, subdomains=None, silent=False,
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'Accept-Language': 'en-US,en;q=0.8',
'Accept-Encoding': 'gzip',
}
}
self.print_banner()

def print_(self, text):
Expand Down Expand Up @@ -793,7 +793,7 @@ def __init__(self, domain, subdomains=None, q=None, silent=False, verbose=True):
base_url = 'https://api.sublist3r.com/search.php?domain={domain}'
self.engine_name = "PassiveDNS"
self.lock = threading.Lock()
self.q = q
self.q = q
super(PassiveDNS, self).__init__(base_url, self.engine_name, domain, subdomains, q=q, silent=silent, verbose=verbose)
return

Expand Down

0 comments on commit a24faca

Please sign in to comment.