This repository was archived by the owner on Feb 10, 2025. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
Latest commit
103 lines (98 loc) · 5.1 KB
/
Copy pathscript.js
File metadata and controls
103 lines (98 loc) · 5.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
varfirst_integer=""
varrandom_numbers_cycles=["8","9","10","11","12","13","14","15","16","17","18","19","20"]
varhow_many_cycles=parseInt(random_numbers_cycles[Math.floor(Math.random()*13)]);
console.log(how_many_cycles);
cycle_passed=0;
functionend(){
// get_password_chosen_input.value = first_integer.slice(0, 9);
console.log("Program Ended")
}
functioncreatePassword(first_integer){
varget_password_chosen_input=document.getElementById("password_chosen_input")
varintegers="ABCDEFGRSTUVWXYZabcdefghiIJKLMjklm6nopqHNOPQrstuvwxyz!@#$%^&*(){}[]\|:;'<>,.?/`~123457890"
// console.log(integers.length)
varfirst_integer_number=Math.floor(Math.random()*integers.length)
varrandom_num=integers[first_integer_number]
varfirst_integer=first_integer+String(random_num)
get_password_chosen_input.value=first_integer.slice(9,9+how_many_cycles)
//undefined - 9 charecters 9 + random length
// get_password_chosen_input.value =
// console.log(cycle_passed)
console.log(first_integer)
cycle_passed=cycle_passed+1
if(cycle_passed==how_many_cycles){
end()
}
else{
createPassword(first_integer)
}
}
createPassword()
functionresetTheAnimation(id){
document.getElementById(id).style="visibility: hidden;"
}
functionfadeOutAnimation(id){
functiontimeoutTemp(){
resetTheAnimation(id)
}
document.getElementById(id).style="animation: fadeOutAnimation ease 0.5s;"
setTimeout(timeoutTemp,500)
}
varletters="abcdefghijklmnopqrstuvwxyz23468"
varrandom_numbers_cycles=["8","9","10","11","12","13","14","15","16","17","18","19","20"]
letscamEmailSubjects=["Your account has been compromised!","Immediate action required: Verify your account now","You’ve won a $1000 gift card!","Claim your free iPhone today!","Your payment is overdue!","You owe the IRS $5000"]
letrealEmailSubjects=["Your account has been successfully updated","Your subscription is about to renew","Account verification required: Please confirm your email address"]
varrealEmailList=["me@yahoo.com","person@google.com","help@openai.com"]
varcorrectAns
functionexpandOversizedMenu(){
document.getElementById("navbarText").classList.toggle("showResizeMenu")
}
functiononStartup(){
console.log("onStartup()")
letsubject
letrandNum=Math.floor(Math.random()*2)+1;
if(randNum==1){
subject=scamEmailSubjects[Math.floor(Math.random()*scamEmailSubjects.length)]
letfakeEmail=""
letrandCycle=random_numbers_cycles[Math.floor(Math.random()*random_numbers_cycles.length)]
randCycle=parseInt(randCycle)
// if (randNum == 1){
console.log(fakeEmail)
console.log(document.getElementById("question"))
console.log(randCycle)
for(leti=0;i==randCycle;i++){
fakeEmail=String(fakeEmail)
fakeEmail=fakeEmail+letters[Math.floor(Math.random()*letters.length)]
console.log(fakeEmail)
console.log(randCycle)
console.log(555)
}
fakeEmailEnding=letters[Math.floor(Math.random()*letters.length)]+letters[Math.floor(Math.random()*letters.length)]+letters[Math.floor(Math.random()*letters.length)]+letters[Math.floor(Math.random()*letters.length)]+letters[Math.floor(Math.random()*letters.length)];
fakeEmail=String(fakeEmail)+"@"+String(fakeEmailEnding)
fakeEmailEnding=letters[Math.floor(Math.random()*letters.length)]+letters[Math.floor(Math.random()*letters.length)]+letters[Math.floor(Math.random()*letters.length)]+letters[Math.floor(Math.random()*letters.length)]+letters[Math.floor(Math.random()*letters.length)];
fakeEmail=fakeEmailEnding+fakeEmail
fakeEmailEnding=letters[Math.floor(Math.random()*letters.length)]+letters[Math.floor(Math.random()*letters.length)]+letters[Math.floor(Math.random()*letters.length)]+letters[Math.floor(Math.random()*letters.length)]+letters[Math.floor(Math.random()*letters.length)];
fakeEmail=fakeEmail+fakeEmailEnding+".com"
document.getElementById("question").innerHTML=String(fakeEmail)
correctAns=1
}
else{
subject=realEmailSubjects[Math.floor(Math.random()*realEmailSubjects.length)]
realEmail=realEmailList[Math.floor(Math.random()*realEmailList.length)]
document.getElementById("question").innerHTML=String(realEmail)
correctAns=2
}
document.getElementById("subject").innerText=subject
}
functionanswered(el){
if(el.id==String(correctAns)){
document.getElementById("feedback").style.visibility="visible"
fadeOutAnimation("feedback")
}
else{
document.getElementById("feedbackInc").style.visibility="visible"
fadeOutAnimation("feedbackInc")
}
onStartup()
}
onStartup()