-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbirbOS.cmd
More file actions
355 lines (332 loc) · 9.64 KB
/
birbOS.cmd
File metadata and controls
355 lines (332 loc) · 9.64 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
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
@echo off
:SYSTEMSTARTUP
set "osbuild=birbOS Build 8.3-1"
title %osbuild%
timeout /t 2 /nobreak > nul
:mainstage
set setthm=<theme.txt
cls
cd %~dp0
if NOT exist .\BOOT.BLDR (cls && color 1f && echo BOOTROM FAILED && ECHO ERRCODE: 000FFF01 00000000 00000011 && echo PRESS ANY KEY TO SHUTDOWN && pause > nul && exit)
echo birbOS is booting.....
if not exist .\fsetup.e (goto firstset)
timeout /t 3 /nobreak > nul
echo birbOS successfully booted.
:prompt
set col=
set bcol=
echo Login to birbOS. (Type "Guest" for guest account, and type "shutdown" to shutdown.)
set user=
set passw=
set pword=
if EXIST .\apps\temp\birbuser.tmp del /q .\apps\temp\birbuser.tmp
cd users
echo.
echo List of available users:
dir /b
echo Guest
cd ..
echo.
set /p "user=Username:"
if "%user%"=="" goto incor
if "%user%"=="Guest" goto logon
if "%user%"=="guest" goto logon
if "%user%"=="shutdown" goto shutdown
if NOT EXIST users\%user%\ goto incor
if NOT exist users\%user%\.birbuser goto logon
set /p passw=<users\%user%\.birbuser
set /p "pword=Password:"
if "%passw%"=="%pword%" goto logon
goto incor
:logon
echo Login successful.
echo.
echo.
echo °°°° ° °°°°°° °°°° °°°° °°°°°
echo ° ° ° ° ° ° ° ° °
echo ° ° ° ° ° ° ° ° ° °
echo °°°°° ° °°°°°°° °°°°° ° ° °°°°°°°
echo ° ° ° °° ° ° ° ° °
echo ° ° ° ° ° ° ° ° ° °
echo °°°° ° ° °° °°°° °°°° °°°°°
echo.
echo.
color 1a
timeout /t 1 /nobreak > nul
color 2b
timeout /t 1 /nobreak > nul
color 3c
timeout /t 1 /nobreak > nul
color 0F
echo Welcome, %user%!
timeout /t 1 /nobreak > nul
echo %user% > .\apps\temp\birbuser.tmp
echo Enter command:
:prompt2
cd %0\..\
set /p setthm=<theme.birbtheme
color %setthm%
set "input="
set /p input="%user%@birbOS ~:"
if "%input%"=="calculate" (goto :calculating)
if "%input%"=="reboot /rec" (echo Rebooting! && timeout /t 3 /nobreak > nul && start .\birbtool.CMD && exit)
if "%input%"=="reboot" (echo Rebooting birbOS. && timeout /t 3 /nobreak > nul && cls && color 07 && goto :SYSTEMSTARTUP)
if "%input%"=="shutdown" (timeout 2 /nobreak > nul && goto shutdown)
if "%input%"=="help" (echo Commands are: help, owo, uwu, birb, calculate, reboot [/rec], shutdown [/f], stfu, guess-game, clear, changelog, about, logoff, runapp, writedoc, readdoc, folder, clean and set-theme. && goto :prompt2 )
if "%input%"=="stfu" (echo no u && goto :prompt2)
if "%input%"=="guess-game" (echo Starting! && goto :gueeees)
if "%input%"=="clear" (cls && goto :prompt2)
if "%input%"=="about" (echo %osbuild% - Developed by xandrei, Dukemz and Ad2017. && goto :prompt2)
if "%input%"=="" (goto :prompt2)
if "%input%"=="changelog" (cls && type .\changelog.txt && echo. && goto :prompt2)
if "%input%"=="logoff" goto logoff
if "%input%"=="folder" goto folder
if "%input%"=="writedoc" goto write
if "%input%"=="readdoc" goto read
if "%input%"=="runapp" goto runapp
if "%input%"=="clean" goto clean
if "%input%"=="shutdown /f" exit
if "%input%"=="set-theme" goto theme
if EXIST apps\games\%input%\%input%.birbgame goto :launchgame
goto :shutdownerr
:incor
cls
color cf
title U BWOKE A EULE
echo Incorrect credentials.
echo Press any key to try again.
pause > nul
color 07
title %osbuild%
cls
goto prompt
:shutdown
cls
echo birbOS is shutting down...
timeout /t 3 /nobreak > nul
if EXIST .\apps\temp\birbuser.tmp del /q .\apps\temp\birbuser.tmp
exit
:calculating
echo The calculator is in an early stage. You may experience crashes and bugs. Have fun!
echo Type exit to go to the prompt
set/p t1=First number:
if %t1%== exit (goto prompt2)
set/p t2=Second number:
set/p equ=Equation: (+,-,*,/)
set/a answer=%t1% %equ% %t2%
echo %answer%
goto prompt2
:shutdownerr
echo Unknown command.
goto prompt2
:gueeees
title Guessing Game
echo Wait while we generate your secret number.
:qset
set "varr"="%random%"
if %varr% GTR 30000 goto qset
if %varr% LSS 10000 goto qset
:game
echo Guess my number! (hint: it's between 30000 and 10000)
set /p "num=>"
:game2
echo %num%| findstr /r "exit">nul
if %ERRORLEVEL%==0 goto skip2223
echo %num%| findstr /r "birb">nul
if %ERRORLEVEL%==0 goto skip2223
echo %num%| findstr /r "^[1-9][0-9]*$">nul
if %ERRORLEVEL%==1 goto reguess
if %ERRORLEVEL%==2 goto reguess
:skip2223
if "%num%"=="birb" (echo The answer is %varr% && goto :reguess)
if "%num%"=="exit" (echo Exiting... && title %osbuild% && goto :prompt2)
if /i %num% GTR %varr% (echo Lower! && goto reguess)
if /i %num% LSS %varr% (echo Higher! && goto reguess)
:win
echo Congratulations! You won!
echo Press any key to exit!
pause > nul
goto prompt2
:reguess
set /p "num=>"
goto game2
:verif
if NOT "%user%"=="" start %input%.cmd && goto prompt2
if "%user%"=="Guest" (echo Sorry. As a guest you can't run files through BirbOS. && goto prompt2)
echo Unexpected Error
pause
exit
:logoff
cls
timeout /t 1 /nobreak > nul
echo Logging off.
timeout /t 2 /nobreak > nul
cls
echo Logging off..
timeout /t 2 /nobreak > nul
cls
echo Logging off...
cls
timeout /t 3 /nobreak > nul
color 07
goto prompt
echo Unexpected Error.
pause
goto prompt2
:folder
if "%user%"=="Guest" echo Sorry, guests can't create folders. && goto prompt2
set /p "fname2=Enter folder name: "
cd users\%user%
md %fname%
cd..
cd..
goto prompt2
:write
if "%user%"=="Guest" echo Guests can't create documents. && goto prompt2
cd users\%user%
set /p docName="Enter document name : "
if exist %docName%.bdoc echo Document exists. && goto write
set /p private="Make file private? (Y/N) : "
echo.>%docName%.bdoc
if %private%==Y echo %docName%.bdoc>>privatedocs.binfo
echo Type "exit.." to exit. Press enter to add new line.
cls
:type
set /p textLine="::"
if "%textLine%"=="exit" cd.. && cd.. && goto prompt2
echo.%textLine%>>%docName%.doc
set textLine=
goto type
:read
if "%user%"=="Guest" echo Guests can't read files. && goto prompt2
set /p userread="Which user's document you want to read? : "
if NOT EXIST users\%userread% echo User not found! && goto prompt2
set /p docread="What document do you want to read? (no .doc) : "
if NOT EXIST users\%userread%\%docread%.bdoc echo Document not found! && goto prompt2
findstr "%docread%.bdoc" users\%userread%\privatedocs.binfo > nul
if %ERRORLEVEL%==0 if NOT "%userread%"=="%user%" (echo Sorry. This file is private. && goto prompt2)
echo Reading users\%userread%\%docread%.bdoc :
echo.
type users\%userread%\%docread%.bdoc
echo.
echo Press any key to exit reader.
pause > nul
goto prompt2
:runapp
if "%user%"=="Guest" echo Guests can't run apps. && goto prompt2
set /p appti="Enter app name (without .birbapp) : "
cd apps
if NOT EXIST %appti%.birbapp (echo App not found. && cd .. && goto prompt2)
copy %appti%.birbapp temp
set temp=%random%
rename temp\%appti%.birbapp temp_app%temp%.bat
attrib +h temp\temp_app%temp%.bat
start temp\temp_app%temp%.bat
cd..
echo After closing the app, use "clean" to get rid of temp files!
goto prompt2
:clean
cd apps\temp
for %%i in (*) do del %%i
echo %user% > birbuser.tmp
echo Cleaned!
cd..
cd..
goto prompt2
:theme
if "%user%"=="Guest" echo Sorry, Guests can't set themes. && goto prompt2
echo Themes : 'dark', 'light-dark', 'light', 'hacker', 'error', 'bsod'.
echo For custom themes, use 'custom'.
echo.
set /p theme="Theme : "
if "%theme%"=="dark" (
echo f>theme.birbtheme
set /p setthm=<theme.birbtheme
color %setthm%
echo.
goto prompt2
)
if "%theme%"=="light-dark" (
echo 8f>theme.birbtheme
set /p setthm=<theme.birbtheme
color %setthm%
goto prompt2
)
if "%theme%"=="light" (
echo f0>theme.birbtheme
set /p setthm=<theme.birbtheme
color %setthm%
goto prompt2
)
if "%theme%"=="hacker" (
echo a>theme.birbtheme
set /p setthm=<theme.birbtheme
color %setthm%
goto prompt2
)
if "%theme%"=="error" (
echo c>theme.birbtheme
set /p setthm=<theme.birbtheme
color %setthm%
goto prompt2
)
if "%theme%"=="bsod" (
echo 1f>theme.birbtheme
set /p setthm=<theme.birbtheme
color %setthm%
goto prompt2
)
if "%theme%"=="custom" (
goto customthm
)
echo.
echo Unknown theme.
echo.
goto theme
:customthm
echo Colors :
echo 0 - black
echo 1 - blue
echo 2 - green
echo 3 - aqua
echo 4 - red
echo 5 - purple
echo 6 - yellow
echo 7 - light gray
echo 8 - gray
echo f - white
echo.
:setcustomthm
set /p tcl="Text color : "
if "%tcl%"=="a" echo Not a color. && goto setcustomthm
if "%tcl%"=="A" echo Not a color. && goto setcustomthm
if "%tcl%"=="B" echo Not a color. && goto setcustomthm
if "%tcl%"=="b" echo Not a color. && goto setcustomthm
if "%tcl%"=="C" echo Not a color. && goto setcustomthm
if "%tcl%"=="c" echo Not a color. && goto setcustomthm
if "%tcl%"=="D" echo Not a color. && goto setcustomthm
if "%tcl%"=="d" echo Not a color. && goto setcustomthm
if "%tcl%"=="E" echo Not a color. && goto setcustomthm
if "%tcl%"=="e" echo Not a color. && goto setcustomthm
for %%i in (1 2 3 4 5 6 7 8 f) do if not %tcl%==%%i echo Not a color. && goto setcustomthm
set /p bgcl="BG color : "
if "%bgcl%"=="a" echo Not a color. && goto setcustomthm
if "%bgcl%"=="A" echo Not a color. && goto setcustomthm
if "%bgcl%"=="B" echo Not a color. && goto setcustomthm
if "%bgcl%"=="b" echo Not a color. && goto setcustomthm
if "%bgcl%"=="C" echo Not a color. && goto setcustomthm
if "%bgcl%"=="c" echo Not a color. && goto setcustomthm
if "%bgcl%"=="D" echo Not a color. && goto setcustomthm
if "%bgcl%"=="d" echo Not a color. && goto setcustomthm
if "%bgcl%"=="E" echo Not a color. && goto setcustomthm
if "%bgcl%"=="e" echo Not a color. && goto setcustomthm
for %%i in (1 2 3 4 5 6 7 8 f) do if not %bgcl%==%%i echo Not a color. && goto setcustomthm
echo %bgcl%%tcl%>theme.birbtheme
set /p setthm=<theme.birbtheme
goto prompt2
:firstset
echo This is the first time birbOS is loaded.
echo Open birbTool to complete the first setup.
echo Press any key to shutdown
pause > nul
exit