RHDyarAP

genmail

Nov 4th, 2018
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.98 KB | None | 0 0
  1. #!/bin/bash
  2. # Coded by RHD
  3. # LICENSE : https://github.com/annai1991/Genmail/blob/master/LICENSE
  4. # Created : 19 October 2018
  5. # Last Modified by: RH Dyar Aryana Putra
  6. # Last Modified time: Tuesday/October/22/2018 09:13 AM
  7.  
  8. ### Daftar warna ###
  9. m='\033[0;31m'
  10. c='\033[0;36m'
  11. k='\033[1;33m'
  12. o='\033[0;33m'
  13. u='\033[0;35m'
  14. h="\e[32m"
  15. p="\e[37m"
  16. n='\033[0m'
  17. Install(){
  18.   apt-get install aptitude
  19.   apt-get install gem
  20.   aptitude install pwgen
  21.   apt install lolcat
  22. }
  23. ###### Header ######
  24. Dialog(){
  25.    printf "${u}Enter your name : ${n}"| lolcat -d 5
  26.    read name
  27.    echo -e "${m}Welcome ${h}$name, ${m}Happy nice day${n}"| lolcat -d 5
  28.    sleep 2
  29.    clear
  30.    echo -e "                     ${m}WARNING!!!${n}"| lolcat -d 5
  31.    echo -e "${o}I don't Accept any responsibility for any illegal usage${n}"| lolcat -d 5
  32. }
  33. Banner() {
  34.     echo ""
  35.   printf "    ${u}____     __  __    ____ ${n}\n"| lolcat -d 5
  36.   printf "   ${u}/ __ \   / / / /   / __ \ ${n}\n"| lolcat -d 5
  37.   printf "  ${u}/ /_/ /  / /_/ /   / / / /${n}\n"| lolcat -d 5
  38.   printf " ${h}/ _, _/  / __  /   / /_/ /${n}\n"| lolcat -d 5
  39.   printf "${h}/_/ |_|  /_/ /_/   /_____/  ${n}\n"| lolcat -d 5
  40.   printf "${u}=============${c}[Generator Mail v1.1 (BETA)]${u}=============${n}\n"| lolcat -d 5
  41.   printf "${u}===============${c}[Contact fb.com/annai23]${u}==============${n}\n"| lolcat -d 5
  42.   }
  43. #### Call header ######
  44.  
  45. ##Install
  46. clear
  47. Dialog
  48. Banner
  49. ####### Input nama/email/pass for generate######
  50. if [ $# -eq 0 ]; then
  51.     echo -e $u"Masukan Jumlah email: "$n | lolcat -d 5
  52.     read numacct
  53. else
  54.     numacct=$1
  55. fi
  56. printf $h"First name: "$n  | lolcat -d 5
  57. read fname
  58. printf $h"Last name: "$n | lolcat -d 5
  59. read lname
  60. printf $o"Mail name: "$n | lolcat -d 5
  61. read user
  62. printf $o"Random char: "$n | lolcat -d 5
  63. read choice
  64. printf $c"Domain name: "$n | lolcat -d 5
  65. read domain
  66. printf $m"Passowrd: "$n | lolcat -d 5
  67. read password
  68.  
  69.  
  70. echo -e $h"Please wait........." | lolcat -d 5
  71. echo -e "${h}creating ${o}$numacct ${h}accounts${n}" | lolcat -d 5
  72. echo "First Name [Required],Last Name [Required],Email Address [Required],Password [Required],Password Hash Function [UPLOAD ONLY],Org Unit Path [Required],New Primary Email [UPLOAD ONLY],Home Secondary Email,Work Secondary Email,Work Phone,Home Phone,Mobile Phone,Work Address,Home Address,Employee ID,Employee Type,Employee Title,Manager Email,Department,Cost Center,Building ID,Floor Name,Floor Section,Change Password at Next Sign-In" > result.csv
  73. for ((i=1; i<=$numacct; i++));
  74. do
  75.   random=$(pwgen -c -n -s $choice 1)
  76.  
  77.  
  78.  #!   email="[email protected]"
  79.  #!   password=$(pwgen -c -n -s -y 8 1 -r "^\`/<>\"'|\[\]\&*_\@#%\.~(),;{}:=")
  80.  printf "${o}[+][CREATED]=> ${n}"| lolcat -d 5
  81.  printf "${p}$user$random@$domain${n}"| lolcat -d 5
  82.  printf "${h}[SUCSES]${n}\n"| lolcat -d 5;
  83.     echo "$fname,$lname,$user$random@$domain,$password,,/,,,,,,,,,,,,,,,,,,FALSE" >> result.csv
  84. done
  85. echo -e "${o}Selesai Bosqu! ${h}Silahkan cek file result.csv${n}"| lolcat -d 5
Advertisement
Add Comment
Please, Sign In to add comment