example code: python2 and python3 install modules, script generators and ctf vulnerability/challenge module wrappers

This commit is contained in:
ts
2018-08-03 15:32:13 +01:00
parent 7072c3162b
commit c546549048
79 changed files with 3796 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
#!/usr/bin/ruby
require_relative '../../../../../../../lib/objects/local_script_challenge_generator.rb'
class RubyExampleScriptGenerator < ScriptChallengeGenerator
def initialize
super
self.module_name = 'Python3 Example Script Generator'
end
def interpreter_path
'/usr/bin/python3'
end
def script_content
"from sys import argv
with open('flag') as f:
print(f.read())"
end
end
RubyExampleScriptGenerator.new.run

View File

@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<generator xmlns="http://www.github/cliffe/SecGen/generator"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.github/cliffe/SecGen/generator">
<name>Ruby Example Challenge Generator</name>
<author>Thomas Shaw</author>
<module_license>MIT</module_license>
<description>TODO</description>
<type>python2_script_challenge</type>
<platform>linux</platform>
<platform>windows</platform>
<output_type>script</output_type>
</generator>