Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Actual relevance github.com/cyniclimbu/rootShell/issues/1
- exit if defined?(Ocra)
- self_name = File.basename $0,".rb" #STRIP OUT EXTENSION OF FILENAME
- #LOCATED ON TEMP DIR
- puts exe_file = self_name + ".exe"
- puts rb_file = self_name + ".rb"
- if File.exists?(rb_file) and File.exists?(exe_file)
- puts "A file with the same name has been detected, please move the file to somewhere else."
- elsif File.exists?(rb_file)
- puts "File is rb"
- elsif File.exists?(exe_file)
- puts "File is exe"
- else
- puts "I'M ERROR, RAWR!"
- end
- =begin
- The title may be misleading so let me explain right quick.
- The code you see above checks if the self-running script is .rb or .exe
- =end
Advertisement
Add Comment
Please, Sign In to add comment