-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path1337-Finder.sh
executable file
·572 lines (493 loc) · 19 KB
/
1337-Finder.sh
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
#!/bin/bash -i
# colors
RED='\033[0;31m'
NO_COLOR='\033[0m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
PURPLE='\033[0;35m'
BGREEN='\033[1;32m'
YELLOW='\033[1;33m'
CYAN='\033[1;36m'
# ascii arts
ROCK_EYEBROW=""
GIGA_CHAD=""
# variables
CURRENT_PAGE="STARTUP"
LDAPER="ldapsearch"
IS_FIRST_TIME=true
USAGE_COUNT=""
USER_EXISTS=false
USER_NAME="Ilyasse Salama"
USER_FIRST_NAME="Ilyasse"
USER_LOGIN="isalama"
USEFUL_LINKS=(
"https://iscsi-tools.1337.ma/"
"https://github-portal.42.fr/login"
"https://overseer.1337.ma/"
"https://mail-students.1337.ma/SOGo/"
"https://find-peers.codam.nl/"
"https://42evaluators.com/calculator"
"https://42evaluators.com/leaderboard/"
)
clearTerm(){
echo -e "\033c"
}
# show banner
init_banner() {
echo -e "${RED}
▄█─ █▀▀█ █▀▀█ ▀▀▀█
─█─ ──▀▄ ──▀▄ ──█─
▄█▄ █▄▄█ █▄▄█ ─▐▌─
░█▀▀▀ ▀█▀ ░█▄─░█ ░█▀▀▄ ░█▀▀▀ ░█▀▀█
░█▀▀▀ ░█─ ░█░█░█ ░█─░█ ░█▀▀▀ ░█▄▄▀
░█─── ▄█▄ ░█──▀█ ░█▄▄▀ ░█▄▄▄ ░█─░█"
sleep 0.1
echo -e "${NO_COLOR} \n\n Created mainly to help students get the info they\n need about a missing student who will evaluate them."
echo -e "${PURPLE} --- Maintained by isalama ---${NO_COLOR}"
set_new_alias
echo -e "${NO_COLOR}\n════════════════════════════════════════════════════════════\n"
sleep 0.1
}
set_new_alias(){
# Set the shell configuration file path based on the current shell
shell_f=$(echo -n "$SHELL" | awk -F / '{print $3}')
shell_f="${HOME}/.${shell_f}rc"
# Add the alias to the shell configuration file if it doesn't exist
if ! grep -q "alias finder='bash <(curl -s https://raw.githubusercontent.com/ilyassesalama/1337-Finder/main/1337-Finder.sh)'" "$shell_f"; then
echo -e "\n\nalias finder='bash <(curl -s https://raw.githubusercontent.com/ilyassesalama/1337-Finder/main/1337-Finder.sh)'" >> "$shell_f"
echo -e "
+--------------------------------------------------------+
| Run this command \"${RED}source $shell_f${NO_COLOR}\" |
| to be able to run the script directly by typing |
| \"${CYAN}finder${YELLOW} LOGIN${NO_COLOR}\" in your terminal. |
+--------------------------------------------------------+"
fi
}
is_ldap_available() {
local ldapsearch_output
ldapsearch_output=$(ldapsearch -LLL -b "dc=1337,dc=ma" -s base "(objectclass=*)")
if [[ $? -eq 0 && "$ldapsearch_output" =~ "1337" ]]; then
return 0 # LDAP is working
else
# Try again with simple bind
ldapsearch_output=$(ldapsearch -x -LLL -b "dc=1337,dc=ma" -s base "(objectclass=*)")
if [[ $? -eq 0 && "$ldapsearch_output" =~ "1337" ]]; then
LDAPER="ldapsearch -x"
return 0 # LDAP is working
else
return 1 # LDAP is not working
fi
fi
}
init_program() {
exec 2> /dev/null
clearTerm
CURRENT_PAGE="INIT"
if is_ldap_available; then
printf '\033[8;40;100t'
if [ -z "$USER_LOGIN" ]; then
init_startup_menu
else
USER_FIRST_NAME=$(eval $LDAPER uid=$USER_LOGIN | grep givenName | awk '{print $2}')
USER_NAME=$(eval $LDAPER uid=$USER_LOGIN | grep cn: | sed 's/cn:/ /' | xargs)
check_if_user_exists
fi
else
echo -e "${RED}
+----------------------------------------------------------+
| It seems like LDAP is broken in the |
| school currently, please try again later |
+----------------------------------------------------------+${NO_COLOR}"
exit 1
fi
}
init_startup_menu() {
CURRENT_PAGE="STARTUP"
clearTerm
init_banner
echo -e "
${YELLOW}1337 Finder Features:${NO_COLOR}
1. Student information
2. Show all freezed students
3. Show all suspended students
4. Useful links for you as a student
5. About the script"
echo -en "${GREEN}\n> Select: ${NO_COLOR}"
read -a var
chosen_info=${var}
if [ $chosen_info -eq 1 ]; then
prompt_student_login
elif [ $chosen_info -eq 2 ]; then
get_all_freezed_users
elif [ $chosen_info -eq 3 ]; then
get_all_suspended_users
elif [ $chosen_info -eq 4 ]; then
get_useful_links
elif [ $chosen_info -eq 5 ]; then
prompt_about_screen
else
init_startup_menu
fi
prompt_end_menu
}
special_user(){
if [ "$USER_LOGIN" == "isalama" ]; then
echo "$ART_ISALAMA"
return 0
elif [ "$USER_LOGIN" == "tajjid" ]; then
echo "$ART_TAJJID"
return 0
else
return 1
fi
}
init_student_info_menu(){
clearTerm
if special_user; then
sleep 0.1
else
init_banner
fi
CURRENT_PAGE="STUDENT_INFO"
echo -en "${YELLOW}Choose the information you need about ${CYAN}$USER_NAME:${NO_COLOR}"
echo -e "
1. Phone number
2. Full name
3. Freeze status
4. Suspension status
5. 1337 email
6. Open student's intra profile
${YELLOW}Menu:${NO_COLOR}
7. Search for another student
8. Go back
9. Exit"
echo -en "${GREEN}\n> Select: ${NO_COLOR}"
read -a var
chosen_info=${var}
if [ $chosen_info -eq 1 ]; then
get_user_phone
elif [ $chosen_info -eq 2 ]; then
get_user_full_name
elif [ $chosen_info -eq 3 ]; then
get_user_freeze_status
elif [ $chosen_info -eq 4 ]; then
get_suspension_status
elif [ $chosen_info -eq 5 ]; then
get_user_mail
elif [ $chosen_info -eq 6 ]; then
open_intra_profile
elif [ $chosen_info -eq 7 ]; then
prompt_student_login
elif [ $chosen_info -eq 8 ]; then
init_startup_menu
elif [ $chosen_info -eq 9 ]; then
exit 0
else
init_student_info_menu
fi
}
prompt_student_login(){
echo -en "${GREEN}> Enter user login: ${NO_COLOR}"
read -a var
USER_LOGIN=${var}
USER_FIRST_NAME=$(eval $LDAPER uid=$USER_LOGIN | grep givenName | awk '{print $2}')
USER_NAME=$(eval $LDAPER uid=$USER_LOGIN | grep cn: | sed 's/cn:/ /' | xargs)
check_if_user_exists
}
# -------- USER INFO SECTION START --------
check_if_user_exists() {
USER_INFO=$(eval $LDAPER uid=$USER_LOGIN | grep givenName)
USER_INFO=$(awk '{print $1}' <<< $USER_INFO | tr -d '[:]')
if [ "$USER_INFO" = "givenName" ]; then
USER_EXISTS=true
init_student_info_menu
else
USER_EXISTS=false
prompt_user_not_found
fi
}
get_user_phone(){
CURRENT_PAGE="USER_PHONE"
clearTerm
init_banner
echo -e "${RED}Important message:${NO_COLOR}"
echo -e "The school removed access to students phone numbers.\nI didn't backup students data in case something like this happens.\nSo, this feature is not available anymore. Sorry for the inconvenience."
# PHONE_NUMBER=$(eval $LDAPER uid=$USER_LOGIN | grep mobile: | awk '{print $2}')
# if [[ -z "$PHONE_NUMBER" ]]; then
# echo -e "${RED}\n❌ We couldn't get the phone number of ${BGREEN}$USER_FIRST_NAME${RED} because they
# either didn't add it to their profile or an error has ocurred."
# else
# echo -en "The phone number of $USER_NAME: "
# echo -e ${CYAN}$PHONE_NUMBER ${NO_COLOR}
# fi
prompt_end_menu
}
get_user_full_name(){
CURRENT_PAGE="USER_FULL_NAME"
clearTerm
init_banner
echo -en "The full name of $USER_LOGIN: "
echo -e ${CYAN}$USER_NAME ${NO_COLOR}
prompt_end_menu
}
get_user_freeze_status(){
CURRENT_PAGE="USER_FREEZE_STATUS"
clearTerm
init_banner
echo -e "The freeze status of $USER_NAME:"
USER_INFO=$(eval $LDAPER uid=$USER_LOGIN | grep freezed)
if [[ "${USER_INFO}" == *"freezed"* ]] ;then
echo -e "╔═ ✅ ${GREEN}$USER_FIRST_NAME${NO_COLOR} has frezeed his curcus."
echo -e "║"
echo -en "╚═ Reason of the freeze: "
FREEZE_REASON=$(eval $LDAPER uid=$USER_LOGIN | grep freezed | sed 's/close:/ /' | grep 'reason:' | sed 's/^.*: //')
echo -e $FREEZE_REASON
else
echo -e "❌ ${RED}$USER_FIRST_NAME${NO_COLOR} has not frezeed his curcus."
fi
prompt_end_menu
}
get_suspension_status(){
CURRENT_PAGE="SUSPENSION_STATUS"
clearTerm
init_banner
echo -e "The suspension status of ${BGREEN}$USER_LOGIN${NO_COLOR}:"
USER_INFO=$(eval $LDAPER uid=$USER_LOGIN | grep "close:")
if [[ "${USER_INFO}" == *"close:"* ]]; then
SUSPENSION_REASON=$(eval $LDAPER uid=$USER_LOGIN | grep "close:" | sed 's/close: //' | sed 's/^/ - /')
echo -e "╔═ ✅ ${GREEN}$USER_FIRST_NAME${NO_COLOR} was or is currently suspended."
echo -e "║"
echo -en "╚═ Reason(s):\n"
echo -e "$SUSPENSION_REASON"
else
echo -e "❌ ${RED}$USER_FIRST_NAME${NO_COLOR} is not suspended."
fi
prompt_end_menu
}
get_user_mail(){
CURRENT_PAGE="USER_MAIL"
clearTerm
init_banner
echo -en "The 1337 Mail of $USER_LOGIN: "
USER_MAIL=$(eval $LDAPER uid=$USER_LOGIN | grep "alias:" | awk '{print $2}')
if [[ -z "$USER_MAIL" ]]; then
echo -e "${RED}\n❌ We couldn't get the 1337 Mail of ${BGREEN}$USER_FIRST_NAME${RED} because they
either didn't add it to their profile or an error has ocurred."
else
echo -e ${CYAN}$USER_MAIL${NO_COLOR}
fi
prompt_end_menu
}
open_intra_profile(){
CURRENT_PAGE="OPEN_INTRA_PROFILE"
clearTerm
init_banner
echo -en "Opening intra profile of ${PURPLE}$USER_NAME${NO_COLOR}... "
sleep 0.3
open "https://profile.intra.42.fr/users/$USER_LOGIN"
echo -e "${GREEN}✓ Done${NO_COLOR}"
prompt_end_menu
}
# -------- USER INFO SECTION END --------
# -------- ALL USERS INFO SECTION START --------
get_all_suspended_users() {
CURRENT_PAGE="ALL_SUSPENSION_STATUS"
clearTerm
init_banner
echo -e "🔎 ${GREEN}Getting all suspended students...\n${NO_COLOR}"
echo -e "${YELLOW}Suspended students:\n${NO_COLOR}"
ldap_command="ldapsearch -x -LLL -b 'dc=1337,dc=ma' '(&(objectClass=inetOrgPerson)(close=*))' cn uid close"
current_login=""
current_name=""
reason=""
eval $ldap_command | while IFS= read -r line
do
if [[ $line == uid:* ]]; then
current_login=$(echo "$line" | cut -d ' ' -f2)
fi
if [[ $line == cn:* ]]; then
current_name=$(echo "$line" | cut -d ' ' -f2-)
fi
if [[ $line == close:* ]]; then
reason=$(echo "$line" | cut -d ' ' -f2-)
# filter out unwanted reasons since they're old or not relevant
if [[
# remove reasons that strictly have only these words
$reason != "bocal" &&
$reason != "Bocal" &&
$reason != "BOCAL" &&
$reason != "not admitted" &&
# remove reasons that contain these words
$reason != *"freezed"* &&
$reason != *"Non admitted"* &&
$reason != *"Black Hole ended."* &&
$reason != *"missing a milestone"* &&
$reason != *"join discord yet"* &&
$reason != *"joined Discord server"*
]]; then
echo -e "${PURPLE}login:${NO_COLOR} $current_login"
echo -e "${PURPLE}name:${NO_COLOR} $current_name"
echo -e "${PURPLE}reason:${NO_COLOR} $reason"
echo "---------------------------------------"
fi
fi
done
}
get_all_freezed_users(){
CURRENT_PAGE="ALL_SUSPENSION_STATUS"
clearTerm
init_banner
echo -e "🔎 ${GREEN}Getting all freezed students...\n${NO_COLOR}"
echo -e "${YELLOW}Freezed students:\n${NO_COLOR}"
ldap_command="ldapsearch -x -LLL -b 'dc=1337,dc=ma' '(&(objectClass=inetOrgPerson)(close=*))' cn uid close"
current_login=""
current_name=""
reason=""
eval $ldap_command | while IFS= read -r line
do
if [[ $line == uid:* ]]; then
current_login=$(echo "$line" | cut -d ' ' -f2)
fi
if [[ $line == cn:* ]]; then
current_name=$(echo "$line" | cut -d ' ' -f2-)
fi
if [[ $line == close:* ]]; then
reason=$(echo "$line" | cut -d ' ' -f2-)
if [[ $reason == *"freezed"* ]]; then
reason=$(echo "$reason" | sed 's/Cursus freezed by [^,]*, because of reason: //')
echo -e "${PURPLE}login:${NO_COLOR} $current_login"
echo -e "${PURPLE}name:${NO_COLOR} $current_name"
echo -e "${PURPLE}reason:${NO_COLOR} $reason"
echo "---------------------------------------"
fi
fi
done
}
# -------- USEFUL LINKS SECTION START --------
get_useful_links(){
clearTerm
init_banner
echo -e "${GREEN}All available useful links:${NO_COLOR}"
echo -e "
1. ISCSI Tools
2. Github student pack
3. Overseer
4. 1337 Mailbox
5. Peers Finder
6. Projects XP Calculator
7. Students Leaderboard
${YELLOW}What's next:${NO_COLOR}
8. Go back
9. Exit"
echo -en "${GREEN}\n> Select: ${NO_COLOR}"
read -r chosen_info
if [[ $chosen_info =~ ^[0-9]+$ ]]; then
chosen_info=$((chosen_info-1))
if [ $chosen_info -lt ${#USEFUL_LINKS[@]} ]; then
open "${USEFUL_LINKS[$chosen_info]}"
fi
fi
chosen_info=$((chosen_info+1))
if [ $chosen_info -eq 8 ]; then
if [ "$USER_EXISTS" = true ]; then
prompt_user_menu
else
init_program
fi
elif [ $chosen_info -eq 9 ]; then
clearTerm
exit
else
get_useful_links
fi
}
# -------- USEFUL LINKS SECTION END --------
# -------- ABOUT SECTION START --------
prompt_about_screen(){
clearTerm
init_banner
echo -e "${YELLOW}About:${NO_COLOR}\n"
echo -e "The purpose of this script is to help students get the\ninformation they need about a missing student who will evaluate them."
echo -e "This script is open source and can be found on GitHub:\nhttps://github.com/ilyassesalama/1337-Finder"
prompt_end_menu
}
# -------- ABOUT SECTION END --------
# -------- MENUS SECTION START --------
prompt_end_menu(){
echo -e "${YELLOW}\nWhat's next?${NO_COLOR}"
echo -e "1. Go back.\n2. Exit.\n"
echo -en "${GREEN}> Select: ${NO_COLOR}"
read -a reset_option
if [ $reset_option -eq 2 ]; then
clearTerm
exit
else
if [ "$USER_EXISTS" = true ]; then
init_student_info_menu
else
init_startup_menu
fi
fi
}
prompt_user_not_found(){
clearTerm
init_banner
echo -e "${RED}❌ Student not found."
USER_LOGIN=""
prompt_end_menu
}
# ------- MENUS SECTION END --------
# -------- ASCII SECTION START --------
init_ascii_art(){
ART_TAJJID="
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠛⠛⠛⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⠉⠁⠀⠀⠀⠀⠀⠀⠀⠉⠻⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⠋⠈⠀⠀⠀⠀⠐⠺⣖⢄⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⡏⢀⡆⠀⠀⠀⢋⣭⣽⡚⢮⣲⠆⠀⠀⠀⠀⠀⠀⢹⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⡇⡼⠀⠀⠀⠀⠈⠻⣅⣨⠇⠈⠀⠰⣀⣀⣀⡀⠀⢸⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⡇⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣟⢷⣶⠶⣃⢀⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⡅⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⠀⠈⠓⠚⢸⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⢀⡠⠀⡄⣀⠀⠀⠀⢻⠀⠀⠀⣠⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠐⠉⠀⠀⠙⠉⠀⠠⡶⣸⠁⠀⣠⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣦⡆⠀⠐⠒⠢⢤⣀⡰⠁⠇⠈⠘⢶⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠠⣄⣉⣙⡉⠓⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⣀⣀⠀⣀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
"
ART_ISALAMA="⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡯⠛⠃⠀⠀⠀⠀⠀⠀⠈⠉⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠝⠁⠀⠀⠀⠀⠀⠀⠀⠀⠐⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⢠⣤⡄⣶⢶⣲⣾⣾⣿⣷⣦⡄⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⣰⡟⡿⢃⢻⣼⣛⣿⣿⣿⣿⣿⢯⣇⠀⠀⠀⠀⠀⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢣⡏⠇⢱⠿⠈⠛⠉⠉⠉⠙⢿⣿⣷⣬⡀⠀⠀⠀⠀⠀⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠸⠛⠐⠀⠀⠀⠀⠀⠀⠀⠒⠐⢹⣿⣿⣧⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢀⠄⠀⠀⠃⣿⡆⠀⠀⠀⠀⢀⣴⣾⣿⣿⣿⡧⠀⣦⣞⡂⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡦⠤⠀⠐⣰⣿⡿⠀⠀⠀⠐⠟⢿⣿⣿⣿⡿⠁⢰⣭⡄⠈⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⢠⡧⠰⠅⠛⠓⠒⠃⠀⠀⠐⢶⡄⠙⠳⠙⠁⠀⠀⢥⣁⣀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⡆⢃⠀⠀⡃⠀⠀⠀⠀⠀⠀⠀⠁⠀⠀⠀⢀⠀⡀⢠⡌⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡌⠀⠘⢡⠄⠖⠂⢂⠀⠀⠀⠀⠀⠀⠀⠀⢠⠟⠀⡇⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⢀⠸⠓⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠀⢀⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢤⠀⠻⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡃⢼⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣬⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣷⡌⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⣀⡀⢠⣄⡀⠀⢈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠲⣬⣍⣛⡛⠻⢿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠸⣿⣷⠀⢰⣿⣿⡿⢿⣿⣿⣿⣿⣿⣿⣿⣷⣷⡐⢾⣿⣿⣿⣶⣆⣉⡛⠿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠄⣿⡿⣆⠀⢹⣿⡏⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄⠈⠛⠻⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⣋⣥⡖⣿⡇⢻⡆⠀⠙⠇⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⠀⠈⠛⢻⣿⡿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⣋⣴⢿⠿⠏⠀⣿⣻⣆⠁⠀⠀⢀⠀⣿⡟⠛⠿⠋⠛⠛⢋⣉⣉⣀⣀⣤⣤⣴⣶⣶⠟⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⣡⣾⡿⢎⣰⣶⢠⣼⣿⣿⣿⡇⠀⠀⣸⠀⢋⣁⣤⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⢀⣠
⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⢛⣩⡴⠞⠉⠀⠽⢃⣾⣶⣦⣴⣦⣀⣠⠝⠻⡀⢠⣋⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⣷⣿⣿
⣿⣿⣿⡿⠟⣋⣥⣶⣶⣿⣿⣿⣿⣿⠇⢀⣠⣿⣿⣿⣿⣿⣿⣍⠁⢤⠀⠓⢻⣿⣿⣾⣟⠛⣹⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⠟⣡⣶⣿⣿⣿⣿⣿⣿⣿⣿⣛⣥⣶⣿⣿⣿⣿⣿⣿⣿⣿⣅⠀⢠⠀⢠⣿⣿⣽⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⣿⣿⣿⣿
⣡⣾⣿⣿⣿⣿⣿⣿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡯⢿⢿⠃⠀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣿⣷⣾⣹⣿⣿⣿
"
}
# -------- ASCII SECTION END --------
if [ ! -z "$1" ]; then
USER_LOGIN=$1
else
USER_LOGIN=""
fi
init_ascii_art
init_program