Skip to content
This repository was archived by the owner on Jun 26, 2025. It is now read-only.

Commit 5c75375

Browse files
committed
fix
1 parent 5d1e08e commit 5c75375

File tree

3 files changed

+85
-34
lines changed

3 files changed

+85
-34
lines changed

.idea/workspace.xml

Lines changed: 26 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jsMain/kotlin/ru/morozovit/webcorrupter/Main.kt

Lines changed: 57 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ object Virus {
4545
html:has(#bsod) {
4646
color: white !important;
4747
background-color: blue !important;
48+
transform: none !important;
4849
}
4950
5051
#bsod {
@@ -61,6 +62,18 @@ object Virus {
6162
height: 100vh;
6263
box-sizing: border-box;
6364
}
65+
66+
@keyframes shake {
67+
0% {
68+
transform: translateX(0);
69+
}
70+
50% {
71+
transform: translate(-5px);
72+
}
73+
100% {
74+
transform: translateX(0);
75+
}
76+
}
6477
"""
6578

6679
fun stop() {
@@ -160,7 +173,7 @@ object Virus {
160173
repeat(numberOfTimes) {
161174
try {
162175
val element = randomElement() as HTMLElement
163-
element.style.animation = "shake 0.5s"
176+
element.style.animation = "shake 0.1s"
164177
element.style.animationIterationCount = "infinite"
165178
} catch (_: Exception) {}
166179
randomDelay()
@@ -179,10 +192,45 @@ object Virus {
179192
}
180193
}
181194

195+
@Suppress("RedundantSuspendModifier")
182196
suspend fun showBSOD() {
183197
console.log("Showing BSOD...")
184198
val browserName = getBrowserName()
185199
val randomHexNumbers = List(5) { generateHexString(8) }
200+
val errorCodes = listOf(
201+
"BUGCODE_USB_DRIVE", "MEMORY_MANAGEMENT", "INACCESSIBLE_BOOT_DEVICE",
202+
"HARDWARE_FAILURE", "SOFTWARE_CRASH", "NETWORK_DISCONNECT",
203+
"FILE_SYSTEM_ERROR", "DRIVER_INSTALLATION_FAILURE", "POWER_SUPPLY_FAILURE",
204+
"DISPLAY_DRIVER_FAILURE", "AUDIO_DRIVER_FAILURE", "INPUT_DEVICE_FAILURE",
205+
"OUTPUT_DEVICE_FAILURE", "PROCESSOR_FAILURE", "MEMORY_CORRUPTION",
206+
"HARD_DISK_FAILURE", "OPERATING_SYSTEM_ERROR", "SYSTEM_CONFIGURATION_ERROR"
207+
)
208+
val fixSteps = listOf(
209+
"Unplug the USB drive and plug it back in. Make sure the cable is securely connected and the drive is properly seated.",
210+
"Check the RAM for any errors. Run a memory test to identify and fix any issues.",
211+
"Try restarting the boot device. If the problem persists, try resetting the CMOS battery.",
212+
"Replace the hard drive with a new one. Make sure the new drive is compatible with your computer's hardware.",
213+
"Update the software drivers. Download and install the latest drivers for your operating system and hardware.",
214+
"Check the network connection. Make sure your computer is connected to the internet and that your router is functioning properly.",
215+
"Format the file system. This will erase all data on the hard drive and create a new, clean file system.",
216+
"Reinstall the necessary drivers. Make sure you have the correct drivers for your hardware and reinstall them.",
217+
"Replace the power supply. If the problem persists, try replacing the power supply with a new one.",
218+
"Update the display driver. Download and install the latest display driver for your graphics card.",
219+
"Check the audio driver. Make sure you have the correct audio driver for your sound card and update it if necessary.",
220+
"Check the input devices. Make sure your keyboard, mouse, and other input devices are properly connected and functioning.",
221+
"Check the output devices. Make sure your monitor, speakers, and other output devices are properly connected and functioning.",
222+
"Check the processor. Make sure your processor is functioning properly and that any overheating issues have been resolved.",
223+
"Run a memory test. This will help identify and fix any memory corruption issues.",
224+
"Check the hard disk for errors. Run a disk check and repair any issues that are found.",
225+
"Update the operating system. Download and install the latest version of your operating system.",
226+
"Check the system configuration. Make sure your computer is properly configured and that any settings or software are functioning correctly."
227+
).shuffled().take(nextInt(1, 5))
228+
val solutions = listOf(
229+
"throw it out of the window",
230+
"leave it alone",
231+
"turn off your computer",
232+
"format your hard drive"
233+
)
186234
document.documentElement!!.innerHTML = """
187235
|<head>
188236
|</head>
@@ -191,29 +239,30 @@ object Virus {
191239
|A problem has been detected and $browserName has been shut down to prevent damage
192240
|to your computer.
193241
|
194-
|BUGCODE_USB_DRIVE
242+
|${errorCodes.random()}
195243
|
196244
|If this is the first time you've seen this Stop error screen,
197245
|restart your computer. If this screen appears again, follow these steps:
198246
|
199-
|Throw your computer out of the window, go outside, touch grass, and the problem
200-
|will fix itself.
247+
|${fixSteps.joinToString("\n")}
201248
|
202-
|If problems continue, you have nothing to do. Just throw it out of the window.
249+
|If problems continue, ${solutions.random()}.
203250
|
204251
|Technical Information:
205252
|
206253
|*** STOP: ${randomHexNumbers[0]} (${randomHexNumbers[1]}, ${randomHexNumbers[2]}, ${randomHexNumbers[3]}, ${randomHexNumbers[4]})
207254
|</pre>
208255
|</body>
209256
""".trimMargin()
257+
document.documentElement!!.addEventListener("contextmenu") {
258+
it.preventDefault()
259+
}
210260
runCatching {
211261
document.documentElement!!.requestFullscreen()
212262
}
213263
loadStyle()
214264
stop()
215-
randomDelay(applySpeedFactor = false)
216-
window.location.reload()
265+
window.scrollTo(0.0, window.innerHeight.toDouble())
217266
throw RuntimeException("Showed BSOD")
218267
}
219268
}
@@ -305,7 +354,7 @@ object Virus {
305354

306355
private suspend fun restorePage() {
307356
while (true) {
308-
randomDelay(20f, false)
357+
randomDelay(40f, false)
309358
console.log("Restoring page...")
310359
if (!isActive) break
311360
document.documentElement!!.innerHTML = prevPage

src/jsMain/resources/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ <h2>What will happen</h2>
5252
<p>The website will start glitching, text starts randomly switching colors, and more.</p>
5353

5454
<div class="grid">
55-
<img src="https://picsum.photos/400/200" alt="Random Image 1" style="max-width: 100%; height: auto;">
56-
<img src="https://picsum.photos/400/200" alt="Random Image 2" style="max-width: 100%; height: auto;">
55+
<img src="" alt="Random Image 1" style="max-width: 100%; height: auto;">
56+
<img src="" alt="Random Image 2" style="max-width: 100%; height: auto;">
5757
</div>
5858

5959
<h3 style="color: #FF5722;">Features of WebCorrupter.js</h3>

0 commit comments

Comments
 (0)