Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- def main():
- login = 'admin'
- passw = '12345'
- ip_count = 200
- path_to_inp_file = 'c:\\test\\results.txt'
- path_to_out_file = 'c:\\test\\ip_out_'
- file = open(path_to_inp_file,'r')
- k = 0
- j = 1
- for line in file:
- csv = open(path_to_out_file+str(j)+'.csv','a')
- temp = '"' + str(k) + '_ip","0","'+line[0:-1:1]+'","8000","0","'+login+'","'+passw+'","0","1","0","0"'+'\n'
- csv.write(temp)
- k += 1
- if k % ip_count == 0:
- j += 1
- csv.close()
- file.close()
- print('Done')
- print('Press any key to continue...')
- input()
- def menu():
- os.system('cls')
- print('What change?',end='\n')
- print('[1] Login',end='\n')
- print('[2] Password',end='\n')
- print('[3] Input file',end='\n')
- print('[4] Output file',end='\n')
- print('[5] Number of IP in file')
- print('[0] Perform',end='\n')
- return int(input())
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment