Minor cleanup

This commit is contained in:
thomashaw
2017-10-20 14:26:16 +01:00
parent 8a0dceb12e
commit 08aad783df
5 changed files with 31 additions and 33 deletions

View File

@@ -1,6 +1,16 @@
# Batch Processing with SecGen
TODO: Write a brief introduction
Generating multiple VMs in a batch is now possible through the use of batch_secgen, a ruby script which uses postgresql
as a job queue to mass-create VMs with SecGen.
There are helper commands available to add jobs, list jobs in the table, remove jobs, and reset the status of jobs from 'running' or 'error' to 'todo'.
When adding multiple jobs to the queue, it is possible to prefix the VM names with unique strings.
The example below demonstrates adding 3 copies of the flawed_fortress scenario, which results in the VM names being prefixed with 'tom_', 'cliffe_', and 'aimee_'.
```
ruby batch_secgen.rb add --instances tom,cliffe,aimee --- -s scenarios/ctf/flawed_fortress_1.xml r
```
## Initialise the Database

View File

@@ -250,7 +250,6 @@ def reset(options)
end
end
def delete(options)
if options[:id] != ''
delete_id(options[:id])
@@ -365,7 +364,7 @@ def generate_range_arg(options)
if @ranges_in_table == nil
@ranges_in_table = []
# Promt to see if we're excluding ranges in the table
# Prompt to see if we're excluding ranges in the table
Print.info 'Do you want to exclude ranges in the database from your random IP generation? [Y/n]'
input = STDIN.gets.chomp
if input == '' or input == 'Y' or input == 'y'
@@ -430,4 +429,4 @@ case ARGV[0]
delete(get_delete_opts)
else
usage
end
end