removing test code from binary_script_container

This commit is contained in:
ts
2018-08-03 11:11:54 +01:00
parent 7152c647fd
commit e1df8957fc
2 changed files with 2 additions and 66 deletions

View File

@@ -1,7 +1,7 @@
class binary_script_container::install {
# Create temp install directory
file { '/root/tmp':
file { '/root/suid/':
ensure => directory,
}
@@ -14,43 +14,8 @@ class binary_script_container::install {
# Make and install
exec { "wrapper make install":
command => 'make suid; install -m a+rx,u+ws -s ./suid /usr/local/bin/suid',
cwd => '/root/tmp',
cwd => '/root/suid/',
path => '/bin:/sbin:/usr/bin:/usr/sbin',
}
# Create group for test TODO: remove me
group { 'test':
ensure => present
}
file { '/home/tmp':
ensure => directory,
}
# Move test file onto box TODO: remove me
file { "/home/tmp/test.sh":
ensure => file,
source => 'puppet:///modules/binary_script_container/test.sh',
group => 'test',
mode => '2775',
require => [Group['test'],File['/home/tmp']],
}
# Test: add a flag file with a group TODO: remove me
::secgen_functions::leak_files { "flag-file-leak":
storage_directory => "/home/tmp/",
leaked_filenames => ['flag'],
strings_to_leak => ['flag{wayy!!!}'],
owner => 'root',
group => 'test',
mode => '0440',
leaked_from => "binary_script_container_flag",
require => [Group['test'], File["/home/tmp/test.sh"]],
}
# Remove temp install directory
}

View File

@@ -1,29 +0,0 @@
import java.io.PrintStream;
import java.util.Scanner;
public class Crackme
{
public Crackme()
{
}
public static void main(String args[])
{
System.out.println("Please enter the password:");
Scanner scanner = new Scanner(System.in);
String s = scanner.next();
if(s.equals("<%= @password %>"))
{
System.out.println("Correct");
System.out.print("Your key is: ");
<% @flag.split('').each do |char|-%>
System.out.print("<%= char %>");
<% end %>
System.out.print("\n");
}
else
{
System.out.println("Wrong");
}
}
}