Last active
November 17, 2018 16:53
-
-
Save b-coimbra/b9a16a829ff31bcbadbed12a1c7dd448 to your computer and use it in GitHub Desktop.
deletes a compiled ruby program while executing itself
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| file = $0.split("/").last | |
| filename = File.basename(file, File.extname(file)) | |
| 3.times { |i| puts "Deleting itself in #{i+1}..."; sleep 0.5 } | |
| exit if defined? Ocra | |
| system "rm #{filename}.exe" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment