mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-21 11:18:06 +00:00
28 lines
532 B
Ruby
28 lines
532 B
Ruby
#!/usr/bin/ruby
|
|
|
|
require_relative 'local_script_challenge_generator.rb'
|
|
class RubyChallengeGenerator < ScriptChallengeGenerator
|
|
|
|
attr_accessor :difficulty
|
|
|
|
def initialize
|
|
super
|
|
self.module_name = 'Ruby Example Script Generator'
|
|
end
|
|
|
|
def pre_challenge_setup
|
|
"flag_path = ''
|
|
if ARGV[0] and File.directory? ARGV[0]
|
|
flag_path = ARGV.shift
|
|
if flag_path[-1] != '/'
|
|
flag_path += '/'
|
|
end
|
|
end
|
|
flag_path += 'flag'\n"
|
|
end
|
|
|
|
def interpreter_path
|
|
'/usr/bin/ruby'
|
|
end
|
|
|
|
end |