Skip to content

Instantly share code, notes, and snippets.

@tennc
Last active August 29, 2015 14:23
Show Gist options
  • Save tennc/cea51111d53b824e2be4 to your computer and use it in GitHub Desktop.
Save tennc/cea51111d53b824e2be4 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# encoding: utf-8
# author: tennc
# date: 2015-06-29
# use: python wyspider_dy.py xxx.txt
import os
import sys
def main():
if len(sys.argv) == 2:
filename = sys.argv[1]
file = open(filename, "r")
for line in file.readlines():
output=os.popen("python wyspider.py %s" %(line))
#print("python wyspider.py %s" %(line))
print("scanning %s......." %(line))
l = open(line.strip('\n') + ".log", "w+")
xx = line.strip('\n') + ".log"
l.writelines(output)
print("scan success! please look %s" %(xx))
else:
print("run error!\nuseage: dy.py xxxx.txt")
sys.exit(1)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment