PowerCell46

Password Validator JS

Nov 21st, 2022
1,529
0
Never
13
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function passwordValidator(password) {
  2.  
  3. passwordLengthCorrect = false;
  4. theDigitsAreFine = false;
  5. theNumberOfNumbersIsFine = false;
  6.  
  7. let currentDigitIsTrue = 0;
  8. let numberOfnumbers = 0;
  9.  
  10. if  (Number(password.length) >= 6 && Number(password.length <= 10)) {
  11. passwordLengthCorrect = true;
  12. } else {
  13. console.log("Password must be between 6 and 10 characters")
  14. }
  15.  
  16. for (let index = 0; index < Number(password.length); index++) { // the For cycle, responsible for the current digit
  17. let currentDigit = password[index];
  18.  
  19. for (let index1 = 48; index1 <= 57; index1++ ) { // the For cycle checking the numbers 0-9
  20.  
  21. if (currentDigit === String.fromCharCode(index1)) {
  22. numberOfnumbers++;
  23. currentDigitIsTrue++;
  24. }
  25. }
  26.  
  27. for (let index2 = 65; index2 <= 90; index2++) { // the For cycle checking the letters A-Z
  28.  
  29. if (currentDigit === String.fromCharCode(index2)) {
  30. currentDigitIsTrue++;
  31. }
  32. }
  33.  
  34. for (let index3 = 97; index3 <= 122; index3++) { // the For cycle checking the letters a-z
  35.  
  36. if (currentDigit === String.fromCharCode(index3)) {
  37. currentDigitIsTrue++;
  38. }
  39. }
  40.  
  41. }
  42.  
  43. if (currentDigitIsTrue === Number(password.length)) {
  44. theDigitsAreFine = true;
  45. } else {
  46. console.log("Password must consist only of letters and digits")
  47. }
  48.  
  49. if (numberOfnumbers < 2) {
  50. console.log("Password must have at least 2 digits")
  51. } else {
  52. theNumberOfNumbersIsFine = true;
  53. }
  54.  
  55. if (passwordLengthCorrect === true && theDigitsAreFine === true && theNumberOfNumbersIsFine === true) {
  56. console.log("Password is valid");
  57. }
  58. }
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Gelnevor
    213 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • User was banned
Add Comment
Please, Sign In to add comment