-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbirbtool.CMD
More file actions
145 lines (133 loc) · 4.2 KB
/
birbtool.CMD
File metadata and controls
145 lines (133 loc) · 4.2 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
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
@echo off
:: birb bootloader v1.4
:: github webhook test
cls
title BirbTool
timeout 3 /nobreak > nul
echo Detecting PCI-E devices.....
if not exist .\fsetup.e goto fsetup
timeout 2 /nobreak > nul
echo birbTool v1.4
:brbldr
echo Boot options:
echo Use "shutdown" to shutdown birbTool.
echo Use "launch" to launch default BirbOS mode.
echo Use "usrtool" to start up the UserTool.
echo Use "dsktool" to check the birbOS installation.
echo Use "changepass" to change the password for your account.
echo Use "deluser" to delete your account.
echo See the BirbOS System version by using "checkver".
:ldr
title BirbTool
cd %0\..\
set ldr=
set/p "ldr=>"
if "%ldr%"=="shutdown" (cls && echo Shutting down the system, please wait... && timeout /t 5 /nobreak > nul && exit)
if "%ldr%"=="launch" (echo Booting from {3f79bb7-b435b05321-651daefd3}... && timeout /t 2 /nobreak > nul && start birbOS.cmd && exit)
if "%ldr%"=="usrtool" (echo Launching UserTool.... && timeout /t 3 /nobreak > nul && goto :start)
if "%ldr%"=="dsktool" (echo Launching dsktool.... && timeout /t 3 /nobreak > nul && goto check)
if "%ldr%"=="changepass" (echo Please wait... && timeout /t 3 /nobreak > nul && goto resetpass)
if "%ldr%"=="deluser" (echo Please wait... && timeout /t 3 /nobreak > nul && goto :deluser)
if "%ldr%"=="checkver" (echo Latest version of BirbOS is 8.3.1 && goto ldr)
if "%ldr%"=="about" (goto about)
if "%ldr%"=="" goto :ldr
echo Invalid choice.
goto :ldr
:usrtoool
cd users
echo birbOS UserTool
set /p "u=Enter username: "
if EXIST %u% goto exist
set /p c="Do you want to set a password? (Y/N): "
if %c%==N goto done
if %c%==n goto done
set /p p="Set password: "
md %u%
cd %u%
echo %p%>.birbuser
attrib +h .birbuser
cd ..
cd ..
echo Done!
pause
goto brbldr
:done
md %u%
cd ..
echo Done!
pause
goto :ldr
:exist
echo Sorry. This username is taken!
pause
goto :start
:resetpass
echo Please enter your username.
set /p "resetuser=Username:"
if "%resetuser%"=="" (echo You can't leave this field blank! && goto ldr)
if NOT exist users\%resetuser%\ goto :incorreset
if NOT exist users\%resetuser%\.birbuser goto :setnewpword
echo Type your old password.
set /p "oldpword=Password:"
set /p oldpassw=<users\%resetuser%\.birbuser
if NOT "%oldpword%"=="%oldpassw%" goto incorreset
:setnewpword
echo Type your new password. (Type "null" to delete your password.)
set /p "newpword=New password:"
if "%newpword%"=="null" (del /a /q .\users\%resetuser%\.birbuser && cd.. && cd.. && echo The user password was deleted. && goto ldr)
echo Retype to confirm:
set /p "newpassw=New password:"
if NOT "%newpassw%"=="%newpword%" goto incorreset
echo %newpword%>.\users\%resetuser%\.birbuser
echo Password successfully changed!
goto ldr
:incorreset
echo Incorrect credentials. Please try again.
goto ldr
:deluser
echo Type your account name and password.
set /p "deluser=Username:"
if "%deluser%"=="" goto incorreset
if NOT exist users\%deluser% goto incorreset
cd users\%deluser%
if NOT exist .\.birbuser goto confirmdel
set /p "delpword=Password:"
set /p delpassw=<.birbuser
if NOT "%delpword%"=="%delpassw%" goto :incorreset
:confirmdel
set /p "delacc=Are you sure you want to delete your account? (Y/N)"
if "%delacc%"=="n" goto ldr
if "%delacc%"=="N" goto ldr
if "%delacc%"=="y" goto delacc
if "%delacc%"=="Y" goto delacc
echo Invalid choice.
goto :confirmdel
:delacc
del /a /q .\*
cd ..
rd %deluser%
echo Your account was deleted successfully.
goto ldr
:check
if NOT EXIST apps echo "apps" folder not found! Please re-install birbOS or create it, and inside it create a folder called "temp"!
if NOT EXIST apps\temp echo "temp" folder not found! Please re-install birbOS or create it inside the "apps" folder!
if NOT EXIST BOOT.BLDR echo BOOT.BLDR not found! Please re-install it to boot up birbOS!
if NOT EXIST birbOS.cmd echo Main birbOS Module not found. reinstall to actually boot birbos up.
echo.
echo Please replace any missing files or folders!
echo If no errors appeared above you're fine!
goto ldr
:about
echo About birbTool:
echo Made by xAndrei166
echo Improved by Ad2017 and Dukemz
goto ldr
:fsetup
timeout 4 /nobreak > nul
echo Completing first time setup...
timeout 1 /nobreak > nul
echo "first-setup-complete" > fsetup.e
echo done.
echo press any key to continue to user creation.
pause > nul
goto usrtoool