IP_List_generator : [experimental] combine module init
This commit is contained in:
parent
4c2d452ea9
commit
f094587b5d
@ -54,6 +54,31 @@ def htaccess(input, output):
|
||||
else:
|
||||
pass
|
||||
|
||||
|
||||
"""
|
||||
Must be in IP List Format!!
|
||||
"""
|
||||
def combine(destination, fileadd):
|
||||
# Append List
|
||||
with open(fileadd ,'r') as f:
|
||||
readinput = f.read().splitlines()
|
||||
with open(destination, 'a') as f:
|
||||
for line in readinput:
|
||||
f.write(line + "\n")
|
||||
f.close()
|
||||
# Clear Duplicated
|
||||
with open(destination, 'r') as f:
|
||||
lines = set(f.readlines())
|
||||
with open(destination, 'w') as f:
|
||||
f.writelines(set(lines))
|
||||
f.close()
|
||||
# Sort
|
||||
with open(destination, 'r') as f:
|
||||
lines = sorted(f.readlines())
|
||||
with open(destination, 'w') as f:
|
||||
for line in lines:
|
||||
f.write(line)
|
||||
|
||||
def BuildDate():
|
||||
UTC = pytz.utc
|
||||
date = datetime.datetime.now(UTC)
|
||||
|
Loading…
Reference in New Issue
Block a user