Skip to content

Instantly share code, notes, and snippets.

@0xd33pstack
Created February 11, 2020 13:36
Show Gist options
  • Save 0xd33pstack/0724c7807b3a25e08bca3c16b0a560c6 to your computer and use it in GitHub Desktop.
Save 0xd33pstack/0724c7807b3a25e08bca3c16b0a560c6 to your computer and use it in GitHub Desktop.
import glob
# Result file
f = open('results.txt', 'a+')
# Read all files in a directory
for cf in glob.glob("*.txt"):
ez = open(cf, encoding='utf8')
lines = ez.readlines()
for line in lines:
if "URL:" in line:
f.write(line)
ez.close
# Close result handle
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment