Adm1n_0v3rride

C password generator

Jun 3rd, 2017
344
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # include <time.h>
  2. # include <stdio.h>
  3. # include <stdlib.h>
  4.  
  5. int
  6. main(void)
  7. {
  8.     /* You can change the length of the password */
  9.     unsigned short int length = 8;
  10.  
  11.     /* Seed number for rand() */
  12.     srand((unsigned int) time(0));
  13.  
  14.     /* ASCII characters 33 to 126 */
  15.     while(length--) {
  16.         putchar(rand() % 94 + 33);
  17.     }
  18.  
  19.     printf("\n");
  20.  
  21.     return EXIT_SUCCESS;
  22. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×