Skip to content

UG-MSU/container-lib

Repository files navigation

YATS - Yet Another Testing System

system that smells bebra and gives rating for it alt text testing jew

Features

  • our project :)
  • blackjack
  • sluts
  • report forks count

WIP

  • cgroups in container_lib.cpp
  • recursion limit
  • sys_call blacklist
  • container security
  • Calculate working time and memory usage

Ideas

  • CTF
  • just use docker
  • github linkage

Example of code

from container_lib_py import Container, ContainerPipes, Exception

# construct neccesary objects
cont = ContainerPipes() # all non-python 
contpy = Container()    # python

opt = cont.launch_options()

# max time for executing program
opt.time = 1000

# max amount of processes executing program
opt.forks_threshold = 8

# percentage of processor load
opt.cpu_usage = 30

# max usage of memory in kilobytes
opt.memory = 32

opt.cgroup_id = "QWERTY"

# input for controlled process
opt.input = "example of input"



try:
    # start binary file with way "./test", options opt and empty arguments
    cont.start("./test", opt, "")
    contpy.start("./test.py", opt, "")
    # YOU MUSTN'T CALL MORE THAN 1 METHOD START FOR COTAINER OBJECT!!!
    # wait for end of the program and print exit status
    print(cont.sync()) 
    print(contpy.sync()) 
    # print output bufer of the program
    print(cont.get_output())  
    print(contpy.get_buf()) 
except Exception.compilation_error as e: #example of handling exception
    print("not compiled")

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published