3 19 javascript Nabiał 2018-11-29 15:26:52 not approved
                    <!DOCTYPE html>
<html><head></head><body onload="gsh()"><script>
function gsh()
{
	var text = "";
	possible = ["ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz", "0123456789", "!@#$%^&*()_+{}[]|;':<>?,./`~"];
	var characters = parseInt(Math.random() * 248 + 8);
	for(var c = 0; c < characters; ++c)
	{
		var poss = parseInt(Math.random() * 4);
		text += possible[poss].charAt(parseInt(Math.random() * Object.keys(possible[poss]).length));
	}
	console.log(text);
}
</script></body></html>
	
click to show comments
3 518 C schrenker 2018-11-28 19:21:05 not approved
                    #include<stdio.h>
main(){srand(time(0));for(int i;i<rand()%248+9;++i){putc(rand()%94+33,stdout);}}
click to show comments
3 500 excel mys7erion 2018-11-23 18:40:45 not approved
1 212 Pascal Limak? Kamil = null; 2018-11-22 12:15:11 not approved
                    var s:string;
    len:Longint;
begin
  Randomize;
  s:='';
  for len:=Random(249)+8 downto 0 do
      s:=s+chr(Random(94)+33);
  writeln(s);
end.
click to show comments
4 1 sql mys7erion 2018-11-22 11:32:03 not approved
edycja działa
                    nie usuwac tego, bo bez tego nie działa
jak edytować?
click to show comments -> click to edit
albo
kilkasz na swój login na navbarze -> click to edit przy kodzie
click to show comments
4 1208 Python Limak? Kamil = null; 2018-11-21 20:14:17 not approved
                    from random import randrange as r
print(''.join([chr(r(93)+33) for i in range(r(248)+8)]))
click to show comments
5 1156 Mighty C Qache 2018-11-21 16:14:39 not approved
Maybe this is the final form
                    #include<stdio.h>
main(){int a;srand(&a);for(a=rand()%249+8;--a;printf("%c",rand()%94+33));}
click to show comments
3 238 VBS BigDinDonMan 2018-11-21 13:47:07 not approved
                    Randomize(0)
dim s(95)
x = 0
i = 33
do while i < 128
s(x) = chr(i)
i = i + 1
x = x + 1
loop
res = ""
x = (256 - 8 + 1) * rnd() + 8
for i = 0 to x
res = res&cstr(s(rnd() * 95))
next
msgbox res
click to show comments
3 381 Ruby BigDinDonMan 2018-11-21 13:25:43 not approved
                    s, _s = "", ""
i, j = 33, 128
while i < j do
  s+=i.chr
  i+=1
end
n, i = 8+rand(256 - 8), 0
while i < n do
  _s+=s[rand(s.length)]
  i+=1
end
print _s
click to show comments
3 812 Mighty C Qache 2018-11-21 10:07:34 not approved
Even shorter C code
                    #include<stdio.h>
main(){int a;srand(&a);char b[a=rand()%249+8];for(int i=0;i<a;b[i++]=rand()%94+33);puts(b);}
click to show comments
3 650 Mighty C Qache 2018-11-20 21:50:50 not approved
Quick and short C code
                    #include<stdio.h>
main(){int c;srand(&c);int a=rand()%249+8;char b[a];for(int i=0;i<a;b[i++]=rand()%94+33);printf("%s",b);}
click to show comments
2 31 C# BigDinDonMan 2018-11-20 19:15:07 not approved
                    using System;
using System.Collections.Generic;
namespace Password {
    class Program {
        static void Main(string[] args) {
            Random rand = new Random();
            char[] chars = new char[127 - 33 + 1];
            for (int i = 33, j = 0; i <= 127; ++i, chars[j] = (char)i, ++j);
            int count = rand.Next(8, 257);
            List<char> pass = new List<char>();
            for (int i = 0; i < count; pass.Add(chars[rand.Next(0, chars.Length)]), ++i);
            Console.WriteLine(new string(pass.ToArray()));
        }
    }
}
click to show comments
2 157 Python BigDinDonMan 2018-11-20 18:56:58 not approved
                    from string import digits, ascii_letters, punctuation
from random import randint
chars = digits + ascii_letters + punctuation
amount = randint(8, 256)
password = [chars[randint(0, len(chars) - 1)] for i in range(amount)]
print("".join(password))
click to show comments
3 129 Python mmnow 2018-11-20 15:56:16 not approved
W przypadku złej wartości wyrzuca wyjątek, adnotacje dla sugestii poprawnych typów
                    import random
import string

charset = string.ascii_letters + string.digits + string.punctuation

def gen(length: int) -> str:
  if not 8 <= length <= 256: raise Exception(f"Wrong length: {length}")
  return ''.join([random.choice(charset) for i in range(0, length)])

click to show comments
-1 22676 Bash Qache 2018-11-20 15:44:16 not approved
This generator is non deterministic and I do not guarantee the expected result
                    vim tryToExitThis.txt
click to show comments