Пример #1
0
	def restrictResources(self):
		resource.setrlimit(resource.RLIMIT_AS, (1024000000, 10240000000000))
		resource.setrlimit(resource.RLIMIT_NPROC, (1,1))
		resource.setrlimit(resource.RLIMIT_CPU, (1,1))
		resource.setrlimit(resource.RLIMIT_NOFILE, (4,4))
	

if __name__ == "__main__":
	
	ob_restrictions = Restrictions()
	ob_restrictions.load()
	print "\n\nRestrictions Loaded !\n"
	try:
		ob_operations = Operations()
		print "Computing: Fibonacci"
		ob_operations.computeFibonacci(10)
		print "computing: Power of 2"
		ob_operations.computePower(128)
	except IOError:
		print "Exception: Too Many Files Open"
	except MemoryError:
		print "Exception: Memory Usage"
	except:
		print "Exception: ", sys.exc_info()[0]

	print "\nLoading Exploit Program\n"

	try:
		ob_security = Security()

		parser = argparse.ArgumentParser()