zapptech Posted April 30, 2016 Report Posted April 30, 2016 Salut, am nevoie de unde script care sa imi genereze cate un user si o parola de la 1 la 600. Exemplu: Camera1 -fsafsa!@#fasfFASFsa Camera2 -fsafdsadsafasfFASFsa Camera3 -fsafsa111#fasfFASFsa Am gasit ceva asemanator si pe net insa nu mi-au fost de folos. Cineva priceput la php? help please :). Quote
QuoVadis Posted April 30, 2016 Report Posted April 30, 2016 Nu e nevoie de nimic special. O poti face in Excel: https://www.extendoffice.com/documents/excel/642-excel-generate-random-string.html https://excelzoom.com/generate-a-random-character-string/ Quote
kznamst Posted April 30, 2016 Report Posted April 30, 2016 http://stackoverflow.com/questions/4356289/php-random-string-generator function generateRandomString($length = 10) { return substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length); } // Echo the random string. // Optionally, you can give it a desired string length up to 62 characters. echo generateRandomString(); Si mai poti face pentru parola cu celelalte charactere: ".^%##$@*(". Etc. Quote
Guest Posted April 30, 2016 Report Posted April 30, 2016 (edited) poftim in python 2.7 import string import random def cameras(size=6, chars=string.ascii_uppercase + string.digits + string.ascii_lowercase): return ''.join(random.choice(chars) for c in range(size)) def cameras2(size=6, chars=string.ascii_uppercase + string.digits + string.ascii_lowercase): return ''.join(random.choice(chars) for c in range(size)) camera = "Camera" nume = 0 Tigan = True f = open("test.txt", "w") l = 600 for puka in range(l): nume = nume + 1 kappa = cameras() kappa1 = cameras2() f.write(camera + str(nume) + " -" + kappa + "@" + kappa1 +"\r\n") Edited April 30, 2016 by Cripterul Quote